You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Taariq Levack <ta...@itaro.co.za> on 2010/06/11 06:23:25 UTC

Is batch resequencing expected to work with JMS INOUT?

Hi

I have a route that works fine without the batch sequencing and it works fine with batch sequencing but INONLY,
it doesn't work when I expect a reply.


I've simplified the code to the following to eliminate my code as much as possible.
from(afisEndpoint).resequence(header(seqNum)).batch(new BatchResequencerConfig(capacity, timeout))
                    .transform(constant("Some response : " + header(seqNum)));

On the client I have...
Object obj = template.sendBodyAndHeader("jms:queue:afis", ExchangePattern.InOut, "some message", "seqnum", "1");
        //confirm we got a value back from the JMS queue
        assertNotNull(obj);



The trace is below but there's no reply coming back to the client and it times out after 20 seconds.
If you'd like a test case I can put it together, just wondering first if there's a usage thing I'm not aware of
or if it looks like a bug and maybe a workaround.

Taariq

[aultMessageListenerContainer-1] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> resequencer <<< Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message
[aultMessageListenerContainer-1] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> resequencer <<< Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message
[ Camel Thread 1 - Batch Sender] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> transform[Some response : header(seqNum)] <<< Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message
[ Camel Thread 1 - Batch Sender] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> transform[Some response : header(seqNum)] <<<  (OUT), Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message, OutBodyType:String, OutBody:Some response : header(seqNum)

RE: Is batch resequencing expected to work with JMS INOUT?

Posted by Taariq Levack <ta...@itaro.co.za>.
I see, that makes sense.
Thanks


-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
Sent: 12 June 2010 05:54 PM
To: users@camel.apache.org
Subject: Re: Is batch resequencing expected to work with JMS INOUT?

Hi

No the resequencer is a stateful EIP which means it receives the
incoming messages and then that Exchange is done.
The resequencer will then by itself "spit out" new exchanges.

This is the same with the Aggregator EIP pattern as well.


On Fri, Jun 11, 2010 at 6:23 AM, Taariq Levack <ta...@itaro.co.za> wrote:
> Hi
>
> I have a route that works fine without the batch sequencing and it works fine with batch sequencing but INONLY,
> it doesn't work when I expect a reply.
>
>
> I've simplified the code to the following to eliminate my code as much as possible.
> from(afisEndpoint).resequence(header(seqNum)).batch(new BatchResequencerConfig(capacity, timeout))
>                    .transform(constant("Some response : " + header(seqNum)));
>
> On the client I have...
> Object obj = template.sendBodyAndHeader("jms:queue:afis", ExchangePattern.InOut, "some message", "seqnum", "1");
>        //confirm we got a value back from the JMS queue
>        assertNotNull(obj);
>
>
>
> The trace is below but there's no reply coming back to the client and it times out after 20 seconds.
> If you'd like a test case I can put it together, just wondering first if there's a usage thing I'm not aware of
> or if it looks like a bug and maybe a workaround.
>
> Taariq
>
> [aultMessageListenerContainer-1] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> resequencer <<< Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message
> [aultMessageListenerContainer-1] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> resequencer <<< Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message
> [ Camel Thread 1 - Batch Sender] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> transform[Some response : header(seqNum)] <<< Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message
> [ Camel Thread 1 - Batch Sender] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> transform[Some response : header(seqNum)] <<<  (OUT), Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message, OutBodyType:String, OutBody:Some response : header(seqNum)
>



--
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Is batch resequencing expected to work with JMS INOUT?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

No the resequencer is a stateful EIP which means it receives the
incoming messages and then that Exchange is done.
The resequencer will then by itself "spit out" new exchanges.

This is the same with the Aggregator EIP pattern as well.


On Fri, Jun 11, 2010 at 6:23 AM, Taariq Levack <ta...@itaro.co.za> wrote:
> Hi
>
> I have a route that works fine without the batch sequencing and it works fine with batch sequencing but INONLY,
> it doesn't work when I expect a reply.
>
>
> I've simplified the code to the following to eliminate my code as much as possible.
> from(afisEndpoint).resequence(header(seqNum)).batch(new BatchResequencerConfig(capacity, timeout))
>                    .transform(constant("Some response : " + header(seqNum)));
>
> On the client I have...
> Object obj = template.sendBodyAndHeader("jms:queue:afis", ExchangePattern.InOut, "some message", "seqnum", "1");
>        //confirm we got a value back from the JMS queue
>        assertNotNull(obj);
>
>
>
> The trace is below but there's no reply coming back to the client and it times out after 20 seconds.
> If you'd like a test case I can put it together, just wondering first if there's a usage thing I'm not aware of
> or if it looks like a bug and maybe a workaround.
>
> Taariq
>
> [aultMessageListenerContainer-1] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> resequencer <<< Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message
> [aultMessageListenerContainer-1] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> resequencer <<< Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message
> [ Camel Thread 1 - Batch Sender] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> transform[Some response : header(seqNum)] <<< Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message
> [ Camel Thread 1 - Batch Sender] Tracer                         INFO  ID:Taariq-NB-58265-1276229795090-2:1:2:1:1 >>> (route2) from(jms://afis) --> transform[Some response : header(seqNum)] <<<  (OUT), Pattern:InOut, Headers:{seqnum=1, JMSRedelivered=false, JMSCorrelationID=a7921b9e-305c-4a6f-a554-c686666259c1, JMSMessageID=ID:Taariq-NB-58265-1276229795090-2:1:2:1:1, JMSXGroupID=null, JMSType=null, JMSDeliveryMode=2, JMSTimestamp=1276229796093, JMSPriority=4, JMSDestination=queue://afis, JMSExpiration=1276229816093, JMSReplyTo=temp-queue://ID:Taariq-NB-58265-1276229795090-2:1:1}, BodyType:String, Body:some message, OutBodyType:String, OutBody:Some response : header(seqNum)
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus