I am not familiar with "JMSXGroupID", but it sounds like you could just use the
Producer API which allows your code to choose the partition to which a given
message is sent -- perform some modulo math on your GroupID, given your number
of partitions ("partitioner.class"). And since only 1 Consumer ever consumers a
given partition (within a single Consumer Group) that should give you what you
want. In otherwords it must be implemented when writing your Producer.
https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+Producer+Example
Philip
-----------------------------------------
http://www.philipotoole.com
On Friday, August 15, 2014 9:43 AM, Andrew Longwill
<[email protected]> wrote:
Hi,
When using multiple partitions and consumers, can Kafka ensure that JMS
messages with the same JMSXGroupID are handled by the same consumer? Or
does this have to be implemented when writing the Producers and Consumers?
For reference, this is in comparison to the clustered message grouping
feature provided by HornetQ:
http://docs.jboss.org/hornetq/2.4.0.Final/docs/user-manual/html/message-grouping.html
"Message groups are useful when you want all messages for a certain value
of the property to be processed serially by the same consumer."
Thanks
Andrew