grouper-users - [grouper-users] Re: multiple instances of custom change log consumer with different configurations
Subject: Grouper Users - Open Discussion List
List archive
[grouper-users] Re: multiple instances of custom change log consumer with different configurations
Chronological Thread
- From: Scott Koranda <>
- To: grouper-users <>
- Subject: [grouper-users] Re: multiple instances of custom change log consumer with different configurations
- Date: Wed, 2 Jul 2014 13:52:41 -0500
On Wed, Jul 2, 2014 at 1:32 PM, Scott Koranda
<>
wrote:
> Hello,
>
> I have a single custom change log consumer class that extends
> ChangeLogConsumerBase. I want to run two instances of this custom
> change log consumer independently so that each instance processes
> changes to two different sets of groups. I want two instances so that
> their operation and maintenance can be decoupled since the two
> different sets of groups have significantly different requirements
> around provisioning.
>
> I expect that in grouper-loader.properties I can simply do
>
> changeLog.consumer.name01.class = org.my.MyClass
> changeLog.consumer.name02.class = org.my.MyClass
>
> I need the class instances, however, to be able to understand if they
> are associated with 'name01' or 'name02' so they can carry out
> slightly different operations--the overall logic of the consumer is
> that same but there are a few differences in how each will need to
> process the changes.
>
> I could certainly make a copy of MyClass -> MyClass2 but I would
> prefer to have a single code base and deal with the few minor
> differences with configuration rather than two distinct classes.
>
> Is there an elegant way for the class to understand if it is
> associated with 'name01' or 'name02'?
>
Apologies for answering my own question so quickly...
I see that the instance of ChangeLogProcessorMetadata passed to
processChangeLogEntries() has a public method getConsumerName() that
presumably returns something related to
changeLog.consumer.name01|2.class.
Does that sound correct?
I will give it a try.
Thanks,
Scott
- [grouper-users] multiple instances of custom change log consumer with different configurations, Scott Koranda, 07/02/2014
- [grouper-users] Re: multiple instances of custom change log consumer with different configurations, Scott Koranda, 07/02/2014
- RE: [grouper-users] multiple instances of custom change log consumer with different configurations, Chris Hyzer, 07/03/2014
Archive powered by MHonArc 2.6.16.