grouper-users - RE: [grouper-users] ChangeLogConsumer ... resubmit event to back of the queue?
Subject: Grouper Users - Open Discussion List
List archive
- From: "Black, Carey M." <>
- To: "Bee-Lindgren, Bert" <>
- Cc: "" <>, "Gettes, Michael" <>
- Subject: RE: [grouper-users] ChangeLogConsumer ... resubmit event to back of the queue?
- Date: Mon, 10 Sep 2018 23:04:24 +0000
- Accept-language: en-US
- Authentication-results: spf=pass (sender IP is 128.146.138.11) smtp.mailfrom=osu.edu; internet2.edu; dkim=pass (signature was verified) header.d=osu.edu;internet2.edu; dmarc=pass action=none header.from=osu.edu;
- Authentication-results-original: spf=none (sender IP is ) ;
- Ironport-phdr: 9a23:F+DFkxdSpNzxKhisCmM37dgtlGMj4u6mDksu8pMizoh2WeGdxc26ZRyN2/xhgRfzUJnB7Loc0qyK6/+mATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfbF/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4rx1QxH0ligIKz858HnWisNuiqJbvAmhrAF7z4LNfY2ZKOZycqbbcNgHR2ROQ9xRWjRBDI2icoUPE+QPM+VWr4b/plsBsRSxCBK2C+/z1jNFnGP60bEk3+knDArI3BYgH9ULsHnMotn4KaMSXvqpw6nL1TnIcu1b1i3n6IfWchEqvPaCUah+fcHMzkQgDAfFgU+MpozmJT+Zy/oBvmaA4upnTuKvlnQrpB9srTiy38ohjJTCiIwSylDB7yp5wYA1KMW5SE59fd6rDoFQtyeEOItqXM8uWX9ntzsnyrAApJW1fzAKxYw5yxHFd/CLbo2F7g/+WOqMJDp4in1odK6jixu3/0iv1OLxWdex3VtPoCdJj8fDumgT2xHS9MSLVv5w8luk1DqSzQ/f9/1ILEU7mKbHL5Mu3rs9m58QvEjdBiP2llv5gayKekgh/+Wn9/nobaj9qZKZOY97lgXzPborl8G+Heg1MwgDUm2b9Oui27Du+1DyTq9Qgf0siKbZtYjXJcQFqa69BA9Yyp4t5gq4ATu639kUhGQKIkpLdR6eiIjmIE/BLOr/Dfein1SjizBrx+3APrL8GJnNNmLDkLD9fblj90Fc1AszzddZ555ODbEBPe7zWkv2tNzfDR81KRC7w+HiCNll14MeX3yAArOBPa/Mq1CE+v8jLuyRaIMIpTrwLvYl6vHygXMlnFIdc7em0JQJZ329G/lrLViVbmT0jtcEC2gKvw4+TOLwiF2FVD5ef229X6Ym6T4nC4KqF5rPSp6jjbGa2ye7BYBWanpYBV+RDHfkb5+EVOsUaCKOPs9hlSQJVbe7S48myBGurBH1y6B+IurJ4S0Xq4jj1MNu6u3XlBEy7iB0D9+D322XTmF0mH8ISCEs3KB5v0N91kmP3bJmjPNFCNwAr89OB00QOJOZ6+18B9/oVwSFNv2EUkrsCoGsDCstCNg8zpoKYkBxFM+viDjE3jbsDLYJmreLQpE47/SP8WL2IpM34XLP36plx3IvWMZefUjgzOYr/QzaDI2Pyh/Cv6GxaOIR0DObpzTL9naHoEwNCF04aq7CR31KIxKO9Y6jtErfU7+jD6gmOQJdyMmEb7FHccDtkU4fFa6xI8zQNnq4gHz4RQ2FwL+BdsLLQy0cx22EUhhCylxNuy/dZU5nX2bEwSrFCSB2U1fmYkfi6+57/XSgUwk5wxzZJ0xny7ev/BMJ37qRR+5Alr4HuSJ0szxvBx79xNPZDdOcuhBsNLpVepsj7U1G22PUu00YXNSgIqlui0RYf1FwpF6o2hlqWYRGjcUwqn42lkx/Jb/LmF9EfimTiIj5IaafI2Lu/RepPqjR3FyW0Nuf9qoVrvoirFC2uxq0UEcu7iZq
- Spamdiagnosticoutput: 1:22
Bert, I understand that all things are temporal.
I have often questioned if a “add_Membership” event really shouldn’t always be treated as a "make the user right in a group".
With the grouper change log consumer being “inside grouper” it is easier to think about doing a quick “is this still the case” check before processing
the event. (And doing something to an outside system.) If the check does not look like the event is still valid… should it be done? In the general “Message Bug” approach the answer is Yes… but…. I have even considered the idea that it may be wise to “look ahead” for related events (by object, maybe by property too?) and maybe “process
them as a unit” as well. if the queue has all of these events at the time of processing: User Add, remove user, add user , change user, remove user then
should the process not add the user at all? Maybe even kill the other events in the queue?)
But that is a long step sideways (AKA: optimization/special case) from the general “Message Bus” approach/design. However, I don’t yet know how to “create a new event in the queue”. ( Any advice / code examples? ) Short of actually doing a “remove user from group” and “add user to group” in grouper. (It would work, but no. Let’s not do that.
J ) I guess I am tripping over the similarities between the “Change log consumers” and the “Messaging System” in Grouper. ( Maybe I am using the wrong interface/thing?
) “Messaging System” https://spaces.at.internet2.edu/pages/viewpage.action?pageId=14517859#GrouperShell(gsh)-GrouperBuiltinMessaging This has some gsh examples to “Send, receive, acknowledge messages in any message system”. I guess I could use a change log consumer to send a “grouper message” to a queue. (to “re-Queue” the event. ) Then maybe use something based on
edu.internet2.middleware.grouper.messaging.MessagingListenerToChangeLogConsumer ? /** * convert a messaging listener to a change log consumer */ Which appears to let you give it a changeLogConsumerClass class to pass the message back to after “ChangeLogEntriesForMessage
=
ChangeLogEntry.fromJsonToCollection(grouperMessage.getMessageBody());”
Hum… seems like a long way around the barn …..
J Or am I completely over thinking this…..
edu.internet2.middleware.grouper.changeLog.ChangeLogEntry /** * <pre> * represents a user change log record. This is a change to a record in the DB (insert/update/delete). *
* note: if this object is headed for the temp table, then the getters in the composite key will not be null, will be empty. * this is a hibernate constraint *
* </pre> */ Sounds like that might be a way to create a new temp change log entry…. ( just need to “convert” the existing event into a new object and save
it?) Maybe something like the following ???? : cle = new ChangeLogEntry(); cle.fromJsonHelper(event_to_requeue.toJson(false(?));
// should that be false or true? Hum…. cle.setTempObject(true) // should I clear any other values? ( IE: “composite
key will not be null, will be empty.” Maybe: .setId(“”) ,
changeLogEntryId?? , sequenceNumber ?? … others? ) cle.save() Thoughts? Michael, Yea.. if I had a “real” Message service… then I could do it from an “outside of grouper” message queue. But I don’t have one of those here.
L Trying to find out if the internal grouper one(s) have a “way” to add events. ( instead of needing to add/remove the thing in grouper to get it
to recreate the events. J ) --
Carey Matthew From: Bee-Lindgren, Bert <>
(This response is at least slightly related to the "Renaming a folder trigger.") I generally have concerns with incremental-event processing and re-queuing/reordering because a membership-add failure might get re-queued and override a successful,subsequent membership-delete.
(for example) I think re-queuing should only be done to a different queue with different semantics: The re-queued message no longer means "Add Subject to a Group" but instead means "make a group right" or, perhaps,
"make the user right in a group." This is why PSPNG has a low-priority full-sync queue where these retries can go when incremental provisioning doesn't work.
Perhaps the Changelog feed should track how many failures a Changelog event experiences and move it to a full-sync (or user-sync-in-a-group) queue? Also, (related to the "Renaming a folder trigger" thread), keep the system simple... there are lots of specialized situations that can occur. However, writing specialized handling of each one means
that consumers get more specialized, probably faster, and more complicated. IMNSHO, if errors are infrequent, then it might be okay to use the (slow) Full-Sync hammer to fix all of them. At least, the dual-hammer (fast/incremental & slow/full) approach should
be tried, instrumented and evaluated. Getting back to the point of view of a changelog stream, I think this means to supply three streams: a) The incremental events b) The Refresh-Subject-In-Group events (for error'ed membership-changes) c) The Refresh-Group events (for error'ed non-membership-changes) A given consumer should be able to then combine (b&c) if they don't think (b) is worth maintaining. From:
<> on behalf of Gettes, Michael <> I think a lot of what you want to do could be achieved with messaging… all dependent on the message broker you choose, of course. |
- [grouper-users] ChangeLogConsumer ... resubmit event to back of the queue?, Black, Carey M., 09/10/2018
- Re: [grouper-users] ChangeLogConsumer ... resubmit event to back of the queue?, Gettes, Michael, 09/10/2018
- Re: [grouper-users] ChangeLogConsumer ... resubmit event to back of the queue?, Bee-Lindgren, Bert, 09/10/2018
- RE: [grouper-users] ChangeLogConsumer ... resubmit event to back of the queue?, Black, Carey M., 09/10/2018
- Re: [grouper-users] ChangeLogConsumer ... resubmit event to back of the queue?, Bee-Lindgren, Bert, 09/10/2018
- Re: [grouper-users] ChangeLogConsumer ... resubmit event to back of the queue?, Gettes, Michael, 09/10/2018
Archive powered by MHonArc 2.6.19.