On 6/19/06, Sanjiv Jivan <[EMAIL PROTECTED]> wrote:
On 6/19/06, James Strachan <[EMAIL PROTECTED]> wrote:> > > 2. Is there a way to detach a message group affinity to a particular > > broker. > > > > >Just set JMSXGroupSeq to zero on the last message which 'closes' the > > >message group so if another message is sent in the future with the > > >same group ID it will be reassigned to a new consumer. > > > > >message.setIntProperty("JMSXGroupSeq", 0); > > > > This would reset all the affinity of all the message groups, right? > > No - just the message group for the JMSXGroupId setting. > > > > This > > does not help with my use case where a message group represents a > > conversation and there can be several "conversations" taking place at > the > > same time. > > I should have been more clear... to clear message group FOO use > > message.setStringProperty("JMSXGroupID", "FOO"); > message.setIntProperty("JMSXGroupSeq", 0); Who is the owner of the "JMSXGroupID" to broker mapping? Is it the JMS Connection or a JMSSession? I need to send messages by different Message Groups from the same client application. I would like to understand if I need to create separate JMS Connections for each message group based conversation, or separate JMS Sessions would suffice. A quick look at the source seems to indicate that Message Groups are held at the JMS connection level (ActiveMQConnectionMetaData). Can you confirm?
A broker manages Message Groups for its consumers. Its nothing to do with connections per se - its purely a mapping of JMSXGroupID to message consumer in a broker.
It would also be great if you could explain the logic used to determine the recipient broker when a message is send using a message group in a "network of brokers" configuration.
the consumers on a remote broker are treated as normal consumers WRT Message Groups.
Is is that all brokers are aware of the message group -> recipient broker mapping and when a message is received by a broker in the network, it looks up the owning broker and appropriately redirects if required?
No - currently the mapping of Message Group ID -> consumer is private to a broker. -- James ------- http://radio.weblogs.com/0112098/
