You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "muthukumaran.m@gmail.com" <mu...@gmail.com> on 2013/12/26 18:52:08 UTC

Message properties missing after Camel - rabbitmq routing

Hi,

I have the following routing defined 

*	<camelContext xmlns="http://camel.apache.org/schema/spring">
		<route>
			<from
uri="rabbitmq://localhost/apm.general.topic?queue=apm.general.queue&amp;routingKey=apm.general.queue&amp;exchangeType=topic&amp;username=guest&amp;password=guest&amp;autoDelete=false&amp;durable=true"
/>
			<removeHeaders pattern="rabbitmq.*"/>
			<to uri="log:com.mycompany.order?level=DEBUG"/>
			<choice>
				<when>
					<simple>${headers.apmtype} == 'scheduler-rest'</simple>
					<to
uri="rabbitmq://localhost/apm.rest.topic?queue=apm.rest.queue&amp;routingKey=apm.rest.queue&amp;exchangeType=topic&amp;username=guest&amp;password=guest&amp;autoDelete=false&amp;durable=true"
/>
				</when>			
			</choice>			 
		</route>
	</camelContext>
*

The is the message I send to the apm.general.queue

<http://camel.465427.n5.nabble.com/file/n5745254/input.png> 

Once the Camel routes the message to apm.rest.queue as you can see message
properties like "reply_to", "correlation_id" are missing.

<http://camel.465427.n5.nabble.com/file/n5745254/out.png> 
Can someone help me with this.

Thanks,
Muthu





--
View this message in context: http://camel.465427.n5.nabble.com/Message-properties-missing-after-Camel-rabbitmq-routing-tp5745254.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Message properties missing after Camel - rabbitmq routing

Posted by "muthukumaran.m@gmail.com" <mu...@gmail.com>.
Thanks Willem & Kraythe for your reply



--
View this message in context: http://camel.465427.n5.nabble.com/Message-properties-missing-after-Camel-rabbitmq-routing-tp5745254p5745507.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Message properties missing after Camel - rabbitmq routing

Posted by "Willem.Jiang" <wi...@gmail.com>.
The correlation_id and reply_to header are removed in 
<removeHeaders pattern="rabbitmq.*"/>

You can find more information about the rabbitmq.* header here[1]

[1]https://github.com/apache/camel/blob/master/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConstants.java



--
View this message in context: http://camel.465427.n5.nabble.com/Message-properties-missing-after-Camel-rabbitmq-routing-tp5745254p5745491.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Message properties missing after Camel - rabbitmq routing

Posted by "kraythe ." <kr...@gmail.com>.
I would guess that RabbitMQ is using their own headers for this and you are
removing those headers in your route when you call <removeHeaders
pattern="rabbitmq.*"/>.

Try removing that line and debugging and see if you find them. Then use
exclude patterns to make sure you dont remove the ones you need.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Thu, Dec 26, 2013 at 11:52 AM, muthukumaran.m@gmail.com <
muthukumaran.m@gmail.com> wrote:

> Hi,
>
> I have the following routing defined
>
> *       <camelContext xmlns="http://camel.apache.org/schema/spring">
>                 <route>
>                         <from
>
> uri="rabbitmq://localhost/apm.general.topic?queue=apm.general.queue&amp;routingKey=apm.general.queue&amp;exchangeType=topic&amp;username=guest&amp;password=guest&amp;autoDelete=false&amp;durable=true"
> />
>                         <removeHeaders pattern="rabbitmq.*"/>
>                         <to uri="log:com.mycompany.order?level=DEBUG"/>
>                         <choice>
>                                 <when>
>                                         <simple>${headers.apmtype} ==
> 'scheduler-rest'</simple>
>                                         <to
>
> uri="rabbitmq://localhost/apm.rest.topic?queue=apm.rest.queue&amp;routingKey=apm.rest.queue&amp;exchangeType=topic&amp;username=guest&amp;password=guest&amp;autoDelete=false&amp;durable=true"
> />
>                                 </when>
>                         </choice>
>                 </route>
>         </camelContext>
> *
>
> The is the message I send to the apm.general.queue
>
> <http://camel.465427.n5.nabble.com/file/n5745254/input.png>
>
> Once the Camel routes the message to apm.rest.queue as you can see message
> properties like "reply_to", "correlation_id" are missing.
>
> <http://camel.465427.n5.nabble.com/file/n5745254/out.png>
> Can someone help me with this.
>
> Thanks,
> Muthu
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Message-properties-missing-after-Camel-rabbitmq-routing-tp5745254.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>