2008/10/17 vanyatka <[EMAIL PROTECTED]>:
>
>
>
> 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>
You're setting the header after its gone to the queue, switch it around...
<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="activemq:virtualQ1" />
<setHeader headerName="dest" value="MyValue" id="hID1">
<simple>simpleTag</simple>
</setHeader>
<to uri="activemq:physicalQ"/>
</route>
</camelContext>
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/