Skip to Content.
Sympa Menu

grouper-users - [grouper-users] multiple instances of custom change log consumer with different configurations

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] multiple instances of custom change log consumer with different configurations


Chronological Thread 
  • From: Scott Koranda <>
  • To: grouper-users <>
  • Subject: [grouper-users] multiple instances of custom change log consumer with different configurations
  • Date: Wed, 2 Jul 2014 13:32:58 -0500

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'?

Thanks,

Scott



Archive powered by MHonArc 2.6.16.

Top of Page