activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjiv Jivan" <sanjiv.ji...@gmail.com>
Subject Re: detaching message group affinity
Date Mon, 19 Jun 2006 21:35:24 GMT
On 6/19/06, James Strachan <james.strachan@gmail.com> wrote:
>
> On 6/19/06, Sanjiv Jivan <sanjiv.jivan@gmail.com> wrote:
> > On 6/19/06, James Strachan <james.strachan@gmail.com> wrote:
> > >
> > >
> > > > 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.
> >
> >
> > A consumer being the value in JMSReplyTo?
>
> Not necessarily - a consumer being some POJO created via
> Session.createMessageConsumer().
>
> But if the consumers are using temporary queues/topics then they are
> nearly the same thing.
>
>
> > I guess what I'm having difficulty
> > understanding is where is the correlation between a single message with
> "
> > message.setIntProperty("JMSXGroupSeq", 0);" to MessageGroupID being
> made. Is
> > it based on JMSReplyTo value provided by the producer sending the
> message?
>
>
> If someone is sending a message and they want to 'close' a message
> group, they set the JMSXGroupSeq header along with the JMSXGroupID
> header.
>
> If some other node who is not a JMS sender wants to close a message
> group, you could always just send a dummy message.
>
>
> > What is the expected behaviour in such a scenario (this is related to
> issue
> > AMQ-760): A network of 2 brokers has been set up. A client sends several
> > messages to MG1 and MG2 which are received by SERVER1 and SERVER2
> > respectively. The client process terminates (ie the JMSConenction,
> > session etc are destroyed). The client comes up an send messages to MG1
> and
> > MG2. Is is guaranteed that MG1 and MG2 go to the designated servers from
> the
> > previous run (SERVER1 and SERVER2 respectively).
>
> Message groups is a broker-side thing; the only thing which affects
> which consumer is associated with a message group is
>
> * when the consumer is closed (e.g. as a result of a Connection
> close), its message groups are put back in the pool to be re-assigned
> to a consumer
>
> * if the message group is explicitly closed by a message containing a
> JMSXGroupId and a JMSXGroupSeq of value 0


Unfortunately "JMSXGroupSeq" does not seem to be resetting the message group
for the corresponding "JMSXGroupID". I'm certain that I'm setting these
properties correctly (even verified by stepping through debugger). As
mentioned in my previous mail, I can provide you with the complete example
that demonstrates this.

Sanjiv

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message