James.Strachan wrote:
> 
> You're best bet is to use Camel to create a route to set a header and
> move messages.
> 
> <from uri="activemq:virtualQ1">
>   <setHeader name="foo" value="bar"/>
>   <to uri="activemq:physicalQ1"/>
> </from>
> 
> then you can use a Content Based Router later on etc.
> 
> 

Thanks for the suggestion. Here is what I added to my activemq.xml file (AMQ
5.1 supports camel AFAIK)

        <camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring";>
                <route>
                        <from uri="activemq:virtualQ1" />
                        <to uri="activemq:physicalQ"/>
                        <setHeader headerName="dest" value="MyValue" id="hID1">
                        <simple>simpleTag</simple>
                        </setHeader>
                </route>
      </camelContext>

The result is that messages are routed correctly, but they arrive without
JMS String Property "dest".
I modified your example a bit to match the actual xml schema.
I don't understand though why I have to put anything into <setHeader> tag.
But the schema tells me so, and so I did )

If you could spot a mistake in my config, I'd appreciate.

Ivan

-- 
View this message in context: 
http://www.nabble.com/how-to-inject-JMS-property-to-all-messages-in-a-queue--tp20015597s22882p20029984.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to