Thanks.

I will have a look at the resources you listed.

I guess you still need to provide a dummy "to" element as part of the route, 
but by setting the CamelJMSDestination header this will actually override the 
producer endpoint?

Regards

From: Claus Ibsen-2 [via Camel] 
[mailto:ml-node+s465427n5768563...@n5.nabble.com]
Sent: 2015/06/25 08:23
To: Du Toit, Elrick WE
Subject: Re: Configure ActiveMQ queue forwarding based on wildcard destinations

Hi

Yes.

You can set a header from the spring xml dsl,

<setHeader name="CamelJmsDestination">
   <simple>foo-${header.someName}</simple>
</setHeader>

And use the simple language to build the string value using dynamic tokens.
http://camel.apache.org/simple

And for more powerful languages you can use groovy, mvel etc
http://camel.apache.org/languages.html

You can use simple / languages in the recipient list as well. Its all
the same in Camel, an Expression (or Predicate).

On Wed, Jun 24, 2015 at 1:54 PM, elrick.dutoit
<[hidden email]</user/SendEmail.jtp?type=node&node=5768563&i=0>> wrote:

> Hi Claus,
>
> Thank you for the response.
>
> I have read through the resources pointed out, but I guess I am just too new 
> to Camel to really understand how use these features to achieve my desired 
> outcome.
>
> Since I am attempting to use the Camel instance embedded into ActiveMQ, it 
> seems that I only have the Spring method for setting up routes. If there was 
> an easy way in which the CamelJMSDestinationName could be set to the incoming 
> queue name, just on the different ActiveMQ instance by just using the Spring 
> environment, it would have been great. But herein lays two challenges:
>
> *         Getting to the incoming queue name (maybe from an existing header?)
>
> *         Dynamically concatenating the destination ActiveMQ name and queue 
> name and assigning it to the destination (maybe using recipientlist with 
> single element).
>
> I will be spending some more time getting to know Camel better, and hopefully 
> I will arrive at an acceptable solution.
>
> Regards
>
> From: Claus Ibsen-2 [via Camel] [mailto:[hidden 
> email]</user/SendEmail.jtp?type=node&node=5768563&i=1>]
> Sent: 2015/06/22 16:23
> To: Du Toit, Elrick WE
> Subject: Re: Configure ActiveMQ queue forwarding based on wildcard 
> destinations
>
> Hi
>
> The "dynamic to" in Camel is this FAQ / eip
> http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html
>
> You can also set a header to reuse, see section _Reuse endpoint and
> send to different destinations computed at runtime_ at
> http://camel.apache.org/jms
>
> On Mon, Jun 22, 2015 at 4:02 PM, elrick.dutoit
> <[hidden email]</user/SendEmail.jtp?type=node&node=5768472&i=0>> wrote:
>
>> Good day,
>>
>> I am very new to Camel and ActiveMQ. I have configured two ActiveMQ
>> instances and would like to use Camel to forward queue messages from the one
>> instance to the other using the same queue names. I would like to configure
>> this using wildcards, basically something like:
>>
>> from=ActiveMQ1:queue:queue.test.>
>> to=ActiveMQ2:queue:queue.test.>
>>
>> When a message is published to the queue queue.test.queuename1 on instance
>> ActiveMQ1, it must be forwarded to a similarly named queue
>> (queue.test.queuename1) on instance ActiveMQ2.
>>
>> I know it is possible to define each (queue) route one for one, but was
>> hoping that it would be possible to use a wildcard in the destination, or
>> somehow construct the destination dynamically to match the name of the
>> actual "from" queue name.
>> Camel did accept the ">" wildcard in the "to" portion of the route, but then
>> all messages ended up in a queue called "queue.test.>" on ActiveMQ2.
>>
>>
>> Regards
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/Configure-ActiveMQ-queue-forwarding-based-on-wildcard-destinations-tp5768470.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]</user/SendEmail.jtp?type=node&node=5768472&i=1>
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>
> ________________________________
> If you reply to this email, your message will be added to the discussion 
> below:
> http://camel.465427.n5.nabble.com/Configure-ActiveMQ-queue-forwarding-based-on-wildcard-destinations-tp5768470p5768472.html
> To unsubscribe from Configure ActiveMQ queue forwarding based on wildcard 
> destinations, click here<
> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
> This e-mail and its attachments, if any, are subject to the ArcelorMittal 
> South Africa Limited e-mail disclaimer which is available on our website at 
> http://www.arcelormittalsa.com/e-mail-disclaimer.pdf . By e-mailing 
> ArcelorMittal South Africa Limited, you consent to the terms and conditions 
> contained in the disclaimer. This email may relate to or be sent from other 
> members of the ArcelorMittal Group. If you are unable to access the 
> disclaimer, or should you have any queries regarding its contents, kindly 
> send an e-mail to [hidden 
> email]</user/SendEmail.jtp?type=node&node=5768563&i=2> .
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Configure-ActiveMQ-queue-forwarding-based-on-wildcard-destinations-tp5768470p5768534.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]</user/SendEmail.jtp?type=node&node=5768563&i=3>
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Configure-ActiveMQ-queue-forwarding-based-on-wildcard-destinations-tp5768470p5768563.html
To unsubscribe from Configure ActiveMQ queue forwarding based on wildcard 
destinations, click 
here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5768470&code=ZWxyaWNrLmR1dG9pdEBhcmNlbG9ybWl0dGFsLmNvbXw1NzY4NDcwfC0xNTcxOTU5MDMz>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
This e-mail and its attachments, if any, are subject to the ArcelorMittal South 
Africa Limited e-mail disclaimer which is available on our website at 
http://www.arcelormittalsa.com/e-mail-disclaimer.pdf . By e-mailing 
ArcelorMittal South Africa Limited, you consent to the terms and conditions 
contained in the disclaimer. This email may relate to or be sent from other 
members of the ArcelorMittal Group. If you are unable to access the disclaimer, 
or should you have any queries regarding its contents, kindly send an e-mail to 
disclai...@arcelormittal.com .




--
View this message in context: 
http://camel.465427.n5.nabble.com/Configure-ActiveMQ-queue-forwarding-based-on-wildcard-destinations-tp5768470p5768567.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to