SpringSource/spring-integration-samples — pull request #94 by fpompermaier (2013-07-30 07:36:31+00:00)
Title: Added HBase sink + trigger on finish sample

HI, I'd like to integrate this example in the official repository (like described in ticket INTSAMPLES-115).

It implements the competing consumers pattern where you can add more consumers to a queue, plus a synchronization mechanism on stop to trigger some action.
In this scenario sources sends JSON messages to a queue and consumers put them into an HBase table, until a message with a "stop" flag tell the consumers to stop. The consumer receiving the "stop" message sends an official stop message to a topic exchange in order to deliver the stop to all consumers of that queue plus a controller that waits for all the consumers of that queue to stop (it knows how many are there thanks to zookeeper/curator), or after a timeout.
Then the controller of the queue perform some action and once finished send a restart message to consumers of the queue. In my original example it calls an external REST service and then it saves data to Solr but I removed that part because it reuse the same principle in the end.
I know it should be more well documented but I'd like to know if it worth of it or not. Moreover I don't have much time but I think this example could be very interesting for the community!

Thanks,
Flavio