You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by damien <da...@mq.edu.au> on 2014/05/22 09:40:58 UTC

recipientList and ExchangePattern do not work

Hi,

I'm using recipientList and set the exchange pattern to InOnly. It looks
like this:

			<setExchangePattern pattern="InOnly"/>
			<recipientList parallelProcessing="true">
				<method ref="recipientListByNameProcessor" />
			</recipientList>

It failed because of the error:


org.apache.camel.ExchangeTimedOutException: The OUT message was not received
within: 20000 millis due reply message

>From the log, I found the ExchangePattern is still InOut (see below), that
probably causes the failure.

Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId              ProcessorId          Processor                                                                       
Elapsed (ms)
[route1            ] [route1            ]
[jms://foo.bar?exchangePattern=InOnly     ] [     20359]
[route1            ] [log1              ] [log                                                                          
] [         1]
[route1            ] [to5               ]
[log:foo.bar?multiline=true&level=trace&sh] [         1]
[route1            ] [recipientList1    ]
[recipientList[bean{recipientListByNameProcessor}]                            
] [     20357]

Exchange
---------------------------------------------------------------------------------------------------------------------------------------
Exchange[
        Id                  ID-***-51750-1400739837702-0-16
        ExchangePattern     InOut
        Headers             {...}
        BodyType            String
        Body                <?xml version="1.0" encoding="utf-8"?>
        ...

I don't know why the exchangePattern is not being overwritten? The camel
version is 1.12.1. But it works with version 1.8 before even without setting 
ExchangePattern.

Can you please help me to fix this problem?
Thanks
Damien




--
View this message in context: http://camel.465427.n5.nabble.com/recipientList-and-ExchangePattern-do-not-work-tp5751457.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: recipientList and ExchangePattern do not work

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

The code you show and the message history are not the same. I guess
you just setExchangePattern=InOnly on the <from> which is not the
same.

The JMS consumer will use InOnly or InOut depending on the JMS message
has a JMSReplyTo or not.
There is some options you can use to force disabling that
http://camel.apache.org/jms

The <setExchangePattern> should work as expected.

On Thu, May 22, 2014 at 9:40 AM, damien <da...@mq.edu.au> wrote:
> Hi,
>
> I'm using recipientList and set the exchange pattern to InOnly. It looks
> like this:
>
>                         <setExchangePattern pattern="InOnly"/>
>                         <recipientList parallelProcessing="true">
>                                 <method ref="recipientListByNameProcessor" />
>                         </recipientList>
>
> It failed because of the error:
>
>
> org.apache.camel.ExchangeTimedOutException: The OUT message was not received
> within: 20000 millis due reply message
>
> From the log, I found the ExchangePattern is still InOut (see below), that
> probably causes the failure.
>
> Message History
> ---------------------------------------------------------------------------------------------------------------------------------------
> RouteId              ProcessorId          Processor
> Elapsed (ms)
> [route1            ] [route1            ]
> [jms://foo.bar?exchangePattern=InOnly     ] [     20359]
> [route1            ] [log1              ] [log
> ] [         1]
> [route1            ] [to5               ]
> [log:foo.bar?multiline=true&level=trace&sh] [         1]
> [route1            ] [recipientList1    ]
> [recipientList[bean{recipientListByNameProcessor}]
> ] [     20357]
>
> Exchange
> ---------------------------------------------------------------------------------------------------------------------------------------
> Exchange[
>         Id                  ID-***-51750-1400739837702-0-16
>         ExchangePattern     InOut
>         Headers             {...}
>         BodyType            String
>         Body                <?xml version="1.0" encoding="utf-8"?>
>         ...
>
> I don't know why the exchangePattern is not being overwritten? The camel
> version is 1.12.1. But it works with version 1.8 before even without setting
> ExchangePattern.
>
> Can you please help me to fix this problem?
> Thanks
> Damien
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/recipientList-and-ExchangePattern-do-not-work-tp5751457.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/