You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "prabumca06@gmail.com" <pr...@gmail.com> on 2013/03/29 19:01:46 UTC

Camel routing issue

I have activemmq  Project in that i have following requirement

1.Move message from Inbound queue to type based inbound queue.
2.Move message from Message type inbound queue to outbound queue

I have created two bean for to achieve this.

1.one for move from inbound to message type  inbound queue
2.one for move from inbound to outbound queue.

I have following entry in camel.xml

   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
  	
		<routeBuilder ref="routeBuilder" />
	    <routeBuilder ref="routeBuilder1" /> 
		
    </camelContext>

    <bean id="routeBuilder"
class="com.camel.routes.SinglecastRouteBuilder"/>
    <bean id="recipientsGenerator"
class="com.camel.routes.TypeSpecificListBean"/>
    <bean id="routeBuilder1"
class="com.camel.routes.MulticastRouteBuilder"/>		
    <bean id="recipientsGenerator1"
class="com.camel.routes.RecipientListBean"/>

When i run application i am getting following error.

* java.lang.Exception: org.apache.camel.RuntimeCamelException:
org.apache.camel.Fa
iledToCreateRouteException: Failed to create route route2:
Route[[From[Inbound.G
MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No endpoint could be
found
 for: Inbound.SSS.TestEvent, please check your classpath contains the needed
Cam
el component jar.*

I am not sure i am missing any configuration,Please kindly help me




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi All,

Camel i having code like this

from(MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME).process(new MemosProcess(*
getContext().**createProducerTemplate()*))
.end();

Above code worked fine in activemq 5.5 but after upgrade into active 5.8 it
is not working.

Message getting hang in MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME not
calling memosprocess class.

Please kindly help me.

*Thanks*
Prabu.N



On Wed, Jul 24, 2013 at 11:49 PM, Christian Mueller [via Camel] <
ml-node+s465427n5736234h56@n5.nabble.com> wrote:

> The test ensure it works:
>
> @Test
> public void testInOnlyJMSExpiration() throws Exception {
>     MockEndpoint mock = getMockEndpoint("mock:result");
>     mock.expectedMessageCount(1);
>
>     long ttl = System.currentTimeMillis() + 5000;
>
> template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
> "Hello World", "JMSExpiration", ttl);
>
>     // sleep just a little
>     Thread.sleep(2000);
>
>     // use timeout in case running on slow box
>     Exchange bar = consumer.receive("activemq:queue:bar", 10000);
>     assertNotNull("Should be a message on queue", bar);
>
>     template.send("activemq:queue:foo", bar);
>
>     assertMockEndpointsSatisfied();
> }
>
> @Test
> public void testInOnlyJMSExpirationNoMessage() throws Exception {
>     MockEndpoint mock = getMockEndpoint("mock:result");
>     mock.expectedMessageCount(1);
>
>     long ttl = System.currentTimeMillis() + 2000;
>
> template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
> "Hello World", "JMSExpiration", ttl);
>
>     // sleep more so the message is expired
>     Thread.sleep(5000);
>
>     Exchange bar = consumer.receiveNoWait("activemq:queue:bar");
>     assertNull("Should NOT be a message on queue", bar);
>
>     template.sendBody("activemq:queue:foo", "Hello World");
>
>     assertMockEndpointsSatisfied();
> }
>
> protected RouteBuilder createRouteBuilder() throws Exception {
>     return new RouteBuilder() {
>         public void configure() throws Exception {
>             from("activemq:queue:foo")
>                 .to("mock:result");
>         }
>     };
> }
>
> Check what you do differently...
>
> Best,
> Christian
> -----------------
>
> Software Integration Specialist
>
> Apache Camel committer: https://camel.apache.org/team
> V.P. Apache Camel: https://www.apache.org/foundation/
> Apache Member: https://www.apache.org/foundation/members.html
>
> https://www.linkedin.com/pub/christian-mueller/11/551/642
>
>
> On Wed, Jul 24, 2013 at 4:42 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5736234&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5736234&i=1>>wrote:
>
>
> > Hi Chris,
> >
> >  Thanks so much for the information.
> >
> > I have tried different property but it did not work.
> >
> > Please find my code below.
> >
> > *public static final String CONSUMER_TEST_QNAME     =
> >
> >
> "activemq:queue:ConsumerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
>
> > *
> > *
> > *
> > *public static final String PRODUCER_TEST_QNAME     =
> >
> >
> "activemq:queue:ProducerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
>
> > *
> > *    *
> > *public static final String MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME
>  =
> > "activemq:queue:Inbound.Memos.Consumer.Test";*
> > *
> > *
> > *public static final String MESSAGING_TEST_PRODUCER_TYPE_SPECIFIC_QNAME
>  =
> > "activemq:queue:Inbound.Memos.Producer.Test";*
> >
> >
> > from(*MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME*).process(new
> Processor()
> > {
> >      public void process(Exchange exchange) throws Exception {
> >
> >      }
> >          .setHeader(MEMOS_TARGET_SERVER,header(MASTER_HANDLER))
> >          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
> >          .to(CONSUMER_TEST_QNAME)
> >          .setHeader(MEMOS_TARGET_SERVER, header(SLAVE_HANDLER))
> >          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
> >          .to(CONSUMER_TEST_QNAME)
> >          .end();
> >
> > But,messages not expiring
> >
> > Please kindly help me
> >
> > *Thanks*
> > Prabu.N
> >
> >
> > On Wed, Jul 24, 2013 at 1:46 AM, Christian Mueller [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5736234&i=2>>
> wrote:
> >
> > > It's not really so difficult to find an example, if you spend only a
> few
> > > minutes:
> > >
> > >
> >
> https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerWithJMSHeaderTest.java;h=52b430b17a7ffc0ca977864ea8c6238050f90a57;hb=HEAD
> > >
> > > Best,
> > > Christian
> > > -----------------
> > >
> > > Software Integration Specialist
> > >
> > > Apache Camel committer: https://camel.apache.org/team
> > > V.P. Apache Camel: https://www.apache.org/foundation/
> > > Apache Member: https://www.apache.org/foundation/members.html
> > >
> > > https://www.linkedin.com/pub/christian-mueller/11/551/642
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736163.html
> > >  To unsubscribe from Camel routing issue, 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
> > >
> > >
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736224.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736234.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5738699.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by Chris Wolf <cw...@gmail.com>.
Here you go:


                .choice().when(header("Type").isNotNull())
                    .recipientList(simple("activemq.Inbound.${header.Type}"))
                .endChoice()


Sorry for hijacking your thread, but I also was not getting
"recipientList" to implement dynamic destinations.  I get it now,
pretty much,
I just don't know how to specify a polling consumer with dynamic uri...

Regards,

Chris

On Sun, Mar 31, 2013 at 2:21 PM, prabumca06@gmail.com
<pr...@gmail.com> wrote:
> Thanks for your faq url,but I did not understand anything from that faq.
>
> as I told already
>
> .to("activemq.Inbound."+ header(" Type")
>
> Please kindly provide with example.
>
> Thanks
> Prabu.n
> On Mar 31, 2013 11:22 PM, "Chris Wolf [via Camel]" <
> ml-node+s465427n5730134h56@n5.nabble.com> wrote:
>
>> Ok, I'm starting to get it - a little bit.  As for my concrete
>> example, so far, I have:
>>
>>                 from("direct:start")
>>                 .beanRef("config")
>>                 .convertBodyTo(Document.class)
>>                 .recipientList().xquery(
>>                     "concat('ftp://'" +
>>                     ",//remote[vendorId/@value='CBOE34']/server/@value" +
>>
>> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>>
>> +
>>                     ",'?noop=true&amp;username='" +
>>                     ",//remote[vendorId/@value='CBOE34']/username/@value"
>> +
>>                     ",'&amp;password='" +
>>
>> ",//remote[vendorId/@value='CBOE34']/password/@value)", String.class);
>>
>> Here's the problem - this will create an FTP Producer - that's not
>> what I need.  I need a dynamically
>> constructed URI for a polling FTP consumer.  I don't think
>> "recipientList" will work...   Any ideas?
>>
>> Thanks,
>>
>> Chris
>>
>> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730134&i=0>>
>> wrote:
>>
>> > Hi Claus,
>> >
>> > I hate to ask this - but I still don't get it.  I thought
>> > "recipientList" was for sending to multiple, runtime-defined
>> > recipients.  I don't see how this
>> > answers the question of sending to one, single recipient, whose URI is
>> > dynamically constructed - and in my use-case the dynamic settings
>> > are not in properties - so "simple" (property place-holders) won't help
>> me.
>> >
>> > Let me give you a concrete example.  I need to do an ftp download and
>> > the connection information comes from up-stream in the route in the
>> > form of XML (DOM - a Document instance).  Currently, I am trying to do
>> > this with bean binding and method params decorated with @XPath
>> > pointing into the Document with the ftp settings and inside the
>> > this method doing:
>> >
>> > FtpComponent ftpComponent = context.getComponent("ftp",
>> FtpComponent.class);
>> >
>> > ..and then attempt to get the endpoint and call createConsumer(...).
>> > I'm sure this is not the right way to do it, but I don't see how else
>> > - any ideas?
>> >
>> > Thanks,
>> >
>> >
>> > Chris
>> >
>> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730134&i=1>>
>> wrote:
>> >> Hi
>> >>
>> >> See this FAQ
>> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> >>
>> >>
>> >>
>> >>
>> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730134&i=2>
>> >> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730134&i=3>>wrote:
>>
>> >>
>> >>> Thanks Walzer..
>> >>> *
>> >>> *
>> >>> *Queston1:
>> >>>
>> >>> *
>> >>> *Example*
>> >>>
>> >>> .when(header("foo").isEqualTo("bar"))
>> >>>                     .to("direct:b")
>> >>>
>> >>> In my case i have to add more than 80 condition and forwards to 80
>> >>> different queues.
>> >>>
>> >>> Above example i can only hard-code queue name,But what i want is
>> below.
>> >>>
>> >>> * .when(header("Type").isNotNull())
>> >>>     .to("activemq.Inbound."+header("Type"))
>> >>> *
>> >>>
>> >>> Example:If queue type is test,It should forward to *Inbound.test*
>> queue.
>> >>>
>> >>> Above example i tried,but it did not worked,created queue something
>> >>> like this *Inbound.header("type")*
>> >>>
>> >>> *Question2*:
>> >>>
>> >>> from("direct:a")
>> >>>             .multicast().to("direct:b", "direct:c", "direct:d");
>> >>>
>> >>> Based on messages header and content type i want forward to different
>> >>> queue.
>> >>>
>> >>> condition will be *OR *and *AND*.How can i do that like above
>> example.*
>> >>> *
>> >>>
>> >>> Thanks in advance*
>> >>> *
>> >>>
>> >>> *Regards*
>> >>>
>> >>> Prabu.N
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
>> >>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5730134&i=4>>
>> wrote:
>> >>>
>> >>> > Hi,
>> >>> >
>> >>> > you could start by reading Claus´ book (p. 44ff) which has a perfect
>> >>> > example or http://camel.apache.org/content-based-router.html (just
>> >>> > replace the direct: with your queues).
>> >>> > If you need to fire your messages to multiple queues:
>> >>> > http://camel.apache.org/publish-subscribe-channel.html shows you
>> the
>> >>> > various ways.
>> >>> > When you get the concepts you can just "lego" them together.
>> >>> >
>> >>> > Regards, Thomas.
>> >>> >
>> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
>> >>> > <[hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>> >>> >
>> >>> > > Hi Claus,
>> >>> > >
>> >>> > > Thanks so much Clus for help.It is working now.
>> >>> > >
>> >>> > > I need your guidance for the following requirement.
>> >>> > >
>> >>> > > 1.I have one *inbound queue* it will receive message frequently
>> from my
>> >>> > > application.
>> >>> > > 2.From *inbound queue* i need camel routing to move message from
>> >>> > > another *message
>> >>> > > based inbound queue* based on message header value.
>> >>> > > 3.From *message based inbound queue *i* *need camel routing to
>> move
>> >>> > message
>> >>> > > to *one or more outbound queue *based on message content*
>> >>> > > *
>> >>> > >
>> >>> > > I need *camel java DSL*sample code for above requirement.*
>> >>> > > *
>> >>> > > *
>> >>> > > *
>> >>> > > *Thanks in advance*
>> >>> > >
>> >>> > >
>> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
>> >>> > > [hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>> >>> > wrote:
>> >>> > >
>> >>> > >> Hi
>> >>> > >>
>> >>> > >> Do as the exception tells you. Check route 2. You route from
>> >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
>> >>> > >>
>> >>> > >> Maybe you need to add "activemq:" as prefix so its
>> >>> > >> "activemq:Inbound.SSS.TestEvent".
>> >>> > >>
>> >>> > >>
>> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
>> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
>> >>> > >> <[hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5730109&i=1
>> >>> >>
>> >>> >
>> >>> > >> wrote:
>> >>> > >>
>> >>> > >>>
>> >>> > >>> I have activemmq  Project in that i have following requirement
>> >>> > >>>
>> >>> > >>> 1.Move message from Inbound queue to type based inbound queue.
>> >>> > >>> 2.Move message from Message type inbound queue to outbound queue
>> >>> > >>>
>> >>> > >>> I have created two bean for to achieve this.
>> >>> > >>>
>> >>> > >>> 1.one for move from inbound to message type  inbound queue
>> >>> > >>> 2.one for move from inbound to outbound queue.
>> >>> > >>>
>> >>> > >>> I have following entry in camel.xml
>> >>> > >>>
>> >>> > >>>   <camelContext id="camel" xmlns="
>> >>> > http://camel.apache.org/schema/spring">
>> >>> > >>
>> >>> > >>>
>> >>> > >>>                <routeBuilder ref="routeBuilder" />
>> >>> > >>>            <routeBuilder ref="routeBuilder1" />
>> >>> > >>>
>> >>> > >>>    </camelContext>
>> >>> > >>>
>> >>> > >>>    <bean id="routeBuilder"
>> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
>> >>> > >>>    <bean id="recipientsGenerator"
>> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
>> >>> > >>>    <bean id="routeBuilder1"
>> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
>> >>> > >>>    <bean id="recipientsGenerator1"
>> >>> > >>> class="com.camel.routes.RecipientListBean"/>
>> >>> > >>>
>> >>> > >>> When i run application i am getting following error.
>> >>> > >>>
>> >>> > >>> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
>> >>> > >>> org.apache.camel.Fa
>> >>> > >>> iledToCreateRouteException: Failed to create route route2:
>> >>> > >>> Route[[From[Inbound.G
>> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No
>> endpoint
>> >>> > could
>> >>> > >> be
>> >>> > >>> found
>> >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath contains
>> the
>> >>> > >> needed
>> >>> > >>> Cam
>> >>> > >>> el component jar.*
>> >>> > >>>
>> >>> > >>> I am not sure i am missing any configuration,Please kindly help
>> me
>> >>> > >>>
>> >>> > >>>
>> >>> > >>>
>> >>> > >>>
>> >>> > >>> --
>> >>> > >>> View this message in context:
>> >>> > >>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>> >>> > >>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>> > >>
>> >>> > >>
>> >>> > >>
>> >>> > >> --
>> >>> > >> Claus Ibsen
>> >>> > >> -----------------
>> >>> > >> Red Hat, Inc.
>> >>> > >> FuseSource is now part of Red Hat
>> >>> > >> Email: [hidden email]<
>> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
>> >>> > >> Web: http://fusesource.com
>> >>> > >> Twitter: davsclaus
>> >>> > >> Blog: http://davsclaus.com
>> >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
>> >>> > >>
>> >>> > >>
>> >>> > >> ------------------------------
>> >>> > >> If you reply to this email, your message will be added to the
>> >>> > discussion
>> >>> > >> below:
>> >>> > >>
>> >>> > >>
>> >>> >
>> >>> > >> .
>> >>> > >> 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
>> >>> >
>> >>> >
>> >>> > >>
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > > --
>> >>> > > Thanks & Regards
>> >>> > > Prabu.N
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > > --
>> >>> > > View this message in context:
>> >>> >
>> >>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>> >>> >
>> >>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>> >
>> >>> >
>> >>> >
>> >>> > ------------------------------
>> >>> >  If you reply to this email, your message will be added to the
>> discussion
>> >>> > below:
>> >>> >
>> >>> >
>> >>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>> >>> >  To unsubscribe from Camel routing issue, 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
>> >>> >
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Thanks & Regards
>> >>>  Prabu.N
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>> >>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> -----------------
>> >> Red Hat, Inc.
>> >> FuseSource is now part of Red Hat
>> >> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730134&i=5>
>> >> Web: http://fusesource.com
>> >> Twitter: davsclaus
>> >> Blog: http://davsclaus.com
>> >> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730134.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730135.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Thanks for your faq url,but I did not understand anything from that faq.

as I told already

.to("activemq.Inbound."+ header(" Type")

Please kindly provide with example.

Thanks
Prabu.n
On Mar 31, 2013 11:22 PM, "Chris Wolf [via Camel]" <
ml-node+s465427n5730134h56@n5.nabble.com> wrote:

> Ok, I'm starting to get it - a little bit.  As for my concrete
> example, so far, I have:
>
>                 from("direct:start")
>                 .beanRef("config")
>                 .convertBodyTo(Document.class)
>                 .recipientList().xquery(
>                     "concat('ftp://'" +
>                     ",//remote[vendorId/@value='CBOE34']/server/@value" +
>
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>
> +
>                     ",'?noop=true&amp;username='" +
>                     ",//remote[vendorId/@value='CBOE34']/username/@value"
> +
>                     ",'&amp;password='" +
>
> ",//remote[vendorId/@value='CBOE34']/password/@value)", String.class);
>
> Here's the problem - this will create an FTP Producer - that's not
> what I need.  I need a dynamically
> constructed URI for a polling FTP consumer.  I don't think
> "recipientList" will work...   Any ideas?
>
> Thanks,
>
> Chris
>
> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730134&i=0>>
> wrote:
>
> > Hi Claus,
> >
> > I hate to ask this - but I still don't get it.  I thought
> > "recipientList" was for sending to multiple, runtime-defined
> > recipients.  I don't see how this
> > answers the question of sending to one, single recipient, whose URI is
> > dynamically constructed - and in my use-case the dynamic settings
> > are not in properties - so "simple" (property place-holders) won't help
> me.
> >
> > Let me give you a concrete example.  I need to do an ftp download and
> > the connection information comes from up-stream in the route in the
> > form of XML (DOM - a Document instance).  Currently, I am trying to do
> > this with bean binding and method params decorated with @XPath
> > pointing into the Document with the ftp settings and inside the
> > this method doing:
> >
> > FtpComponent ftpComponent = context.getComponent("ftp",
> FtpComponent.class);
> >
> > ..and then attempt to get the endpoint and call createConsumer(...).
> > I'm sure this is not the right way to do it, but I don't see how else
> > - any ideas?
> >
> > Thanks,
> >
> >
> > Chris
> >
> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730134&i=1>>
> wrote:
> >> Hi
> >>
> >> See this FAQ
> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> >>
> >>
> >>
> >>
> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730134&i=2>
> >> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730134&i=3>>wrote:
>
> >>
> >>> Thanks Walzer..
> >>> *
> >>> *
> >>> *Queston1:
> >>>
> >>> *
> >>> *Example*
> >>>
> >>> .when(header("foo").isEqualTo("bar"))
> >>>                     .to("direct:b")
> >>>
> >>> In my case i have to add more than 80 condition and forwards to 80
> >>> different queues.
> >>>
> >>> Above example i can only hard-code queue name,But what i want is
> below.
> >>>
> >>> * .when(header("Type").isNotNull())
> >>>     .to("activemq.Inbound."+header("Type"))
> >>> *
> >>>
> >>> Example:If queue type is test,It should forward to *Inbound.test*
> queue.
> >>>
> >>> Above example i tried,but it did not worked,created queue something
> >>> like this *Inbound.header("type")*
> >>>
> >>> *Question2*:
> >>>
> >>> from("direct:a")
> >>>             .multicast().to("direct:b", "direct:c", "direct:d");
> >>>
> >>> Based on messages header and content type i want forward to different
> >>> queue.
> >>>
> >>> condition will be *OR *and *AND*.How can i do that like above
> example.*
> >>> *
> >>>
> >>> Thanks in advance*
> >>> *
> >>>
> >>> *Regards*
> >>>
> >>> Prabu.N
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
> >>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5730134&i=4>>
> wrote:
> >>>
> >>> > Hi,
> >>> >
> >>> > you could start by reading Claus´ book (p. 44ff) which has a perfect
> >>> > example or http://camel.apache.org/content-based-router.html (just
> >>> > replace the direct: with your queues).
> >>> > If you need to fire your messages to multiple queues:
> >>> > http://camel.apache.org/publish-subscribe-channel.html shows you
> the
> >>> > various ways.
> >>> > When you get the concepts you can just "lego" them together.
> >>> >
> >>> > Regards, Thomas.
> >>> >
> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> >>> > <[hidden email] <
> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> >>> >
> >>> > > Hi Claus,
> >>> > >
> >>> > > Thanks so much Clus for help.It is working now.
> >>> > >
> >>> > > I need your guidance for the following requirement.
> >>> > >
> >>> > > 1.I have one *inbound queue* it will receive message frequently
> from my
> >>> > > application.
> >>> > > 2.From *inbound queue* i need camel routing to move message from
> >>> > > another *message
> >>> > > based inbound queue* based on message header value.
> >>> > > 3.From *message based inbound queue *i* *need camel routing to
> move
> >>> > message
> >>> > > to *one or more outbound queue *based on message content*
> >>> > > *
> >>> > >
> >>> > > I need *camel java DSL*sample code for above requirement.*
> >>> > > *
> >>> > > *
> >>> > > *
> >>> > > *Thanks in advance*
> >>> > >
> >>> > >
> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
> >>> > > [hidden email] <
> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> >>> > wrote:
> >>> > >
> >>> > >> Hi
> >>> > >>
> >>> > >> Do as the exception tells you. Check route 2. You route from
> >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
> >>> > >>
> >>> > >> Maybe you need to add "activemq:" as prefix so its
> >>> > >> "activemq:Inbound.SSS.TestEvent".
> >>> > >>
> >>> > >>
> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> >>> > >> <[hidden email] <
> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> >>> >>
> >>> >
> >>> > >> wrote:
> >>> > >>
> >>> > >>>
> >>> > >>> I have activemmq  Project in that i have following requirement
> >>> > >>>
> >>> > >>> 1.Move message from Inbound queue to type based inbound queue.
> >>> > >>> 2.Move message from Message type inbound queue to outbound queue
> >>> > >>>
> >>> > >>> I have created two bean for to achieve this.
> >>> > >>>
> >>> > >>> 1.one for move from inbound to message type  inbound queue
> >>> > >>> 2.one for move from inbound to outbound queue.
> >>> > >>>
> >>> > >>> I have following entry in camel.xml
> >>> > >>>
> >>> > >>>   <camelContext id="camel" xmlns="
> >>> > http://camel.apache.org/schema/spring">
> >>> > >>
> >>> > >>>
> >>> > >>>                <routeBuilder ref="routeBuilder" />
> >>> > >>>            <routeBuilder ref="routeBuilder1" />
> >>> > >>>
> >>> > >>>    </camelContext>
> >>> > >>>
> >>> > >>>    <bean id="routeBuilder"
> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> >>> > >>>    <bean id="recipientsGenerator"
> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> >>> > >>>    <bean id="routeBuilder1"
> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
> >>> > >>>    <bean id="recipientsGenerator1"
> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> >>> > >>>
> >>> > >>> When i run application i am getting following error.
> >>> > >>>
> >>> > >>> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
> >>> > >>> org.apache.camel.Fa
> >>> > >>> iledToCreateRouteException: Failed to create route route2:
> >>> > >>> Route[[From[Inbound.G
> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No
> endpoint
> >>> > could
> >>> > >> be
> >>> > >>> found
> >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath contains
> the
> >>> > >> needed
> >>> > >>> Cam
> >>> > >>> el component jar.*
> >>> > >>>
> >>> > >>> I am not sure i am missing any configuration,Please kindly help
> me
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>> --
> >>> > >>> View this message in context:
> >>> > >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> >>> > >>> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>> > >>
> >>> > >>
> >>> > >>
> >>> > >> --
> >>> > >> Claus Ibsen
> >>> > >> -----------------
> >>> > >> Red Hat, Inc.
> >>> > >> FuseSource is now part of Red Hat
> >>> > >> Email: [hidden email]<
> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> >>> > >> Web: http://fusesource.com
> >>> > >> Twitter: davsclaus
> >>> > >> Blog: http://davsclaus.com
> >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
> >>> > >>
> >>> > >>
> >>> > >> ------------------------------
> >>> > >> If you reply to this email, your message will be added to the
> >>> > discussion
> >>> > >> below:
> >>> > >>
> >>> > >>
> >>> >
> >>> > >> .
> >>> > >> 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
> >>> >
> >>> >
> >>> > >>
> >>> > >
> >>> > >
> >>> > >
> >>> > > --
> >>> > > Thanks & Regards
> >>> > > Prabu.N
> >>> > >
> >>> > >
> >>> > >
> >>> > >
> >>> > > --
> >>> > > View this message in context:
> >>> >
> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> >>> >
> >>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >>> >
> >>> >
> >>> >
> >>> > ------------------------------
> >>> >  If you reply to this email, your message will be added to the
> discussion
> >>> > below:
> >>> >
> >>> >
> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> >>> >  To unsubscribe from Camel routing issue, 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
> >>> >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Thanks & Regards
> >>>  Prabu.N
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> >>> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>>
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> FuseSource is now part of Red Hat
> >> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730134&i=5>
> >> Web: http://fusesource.com
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730134.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730135.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi All,

Camel i having code like this

from(MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME).process(new MemosProcess(*
getContext().**createProducerTemplate()*))
.end();

Above code worked fine in activemq 5.5 but after upgrade into active 5.8 it
is not working.

Message getting hang in MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME not
calling memosprocess class.

Please kindly help me.

*Thanks*
Prabu.N



On Wed, Jul 24, 2013 at 11:49 PM, Christian Mueller [via Camel] <
ml-node+s465427n5736234h56@n5.nabble.com> wrote:

> The test ensure it works:
>
> @Test
> public void testInOnlyJMSExpiration() throws Exception {
>     MockEndpoint mock = getMockEndpoint("mock:result");
>     mock.expectedMessageCount(1);
>
>     long ttl = System.currentTimeMillis() + 5000;
>
> template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
> "Hello World", "JMSExpiration", ttl);
>
>     // sleep just a little
>     Thread.sleep(2000);
>
>     // use timeout in case running on slow box
>     Exchange bar = consumer.receive("activemq:queue:bar", 10000);
>     assertNotNull("Should be a message on queue", bar);
>
>     template.send("activemq:queue:foo", bar);
>
>     assertMockEndpointsSatisfied();
> }
>
> @Test
> public void testInOnlyJMSExpirationNoMessage() throws Exception {
>     MockEndpoint mock = getMockEndpoint("mock:result");
>     mock.expectedMessageCount(1);
>
>     long ttl = System.currentTimeMillis() + 2000;
>
> template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
> "Hello World", "JMSExpiration", ttl);
>
>     // sleep more so the message is expired
>     Thread.sleep(5000);
>
>     Exchange bar = consumer.receiveNoWait("activemq:queue:bar");
>     assertNull("Should NOT be a message on queue", bar);
>
>     template.sendBody("activemq:queue:foo", "Hello World");
>
>     assertMockEndpointsSatisfied();
> }
>
> protected RouteBuilder createRouteBuilder() throws Exception {
>     return new RouteBuilder() {
>         public void configure() throws Exception {
>             from("activemq:queue:foo")
>                 .to("mock:result");
>         }
>     };
> }
>
> Check what you do differently...
>
> Best,
> Christian
> -----------------
>
> Software Integration Specialist
>
> Apache Camel committer: https://camel.apache.org/team
> V.P. Apache Camel: https://www.apache.org/foundation/
> Apache Member: https://www.apache.org/foundation/members.html
>
> https://www.linkedin.com/pub/christian-mueller/11/551/642
>
>
> On Wed, Jul 24, 2013 at 4:42 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5736234&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5736234&i=1>>wrote:
>
>
> > Hi Chris,
> >
> >  Thanks so much for the information.
> >
> > I have tried different property but it did not work.
> >
> > Please find my code below.
> >
> > *public static final String CONSUMER_TEST_QNAME     =
> >
> >
> "activemq:queue:ConsumerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
>
> > *
> > *
> > *
> > *public static final String PRODUCER_TEST_QNAME     =
> >
> >
> "activemq:queue:ProducerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
>
> > *
> > *    *
> > *public static final String MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME
>  =
> > "activemq:queue:Inbound.Memos.Consumer.Test";*
> > *
> > *
> > *public static final String MESSAGING_TEST_PRODUCER_TYPE_SPECIFIC_QNAME
>  =
> > "activemq:queue:Inbound.Memos.Producer.Test";*
> >
> >
> > from(*MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME*).process(new
> Processor()
> > {
> >      public void process(Exchange exchange) throws Exception {
> >
> >      }
> >          .setHeader(MEMOS_TARGET_SERVER,header(MASTER_HANDLER))
> >          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
> >          .to(CONSUMER_TEST_QNAME)
> >          .setHeader(MEMOS_TARGET_SERVER, header(SLAVE_HANDLER))
> >          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
> >          .to(CONSUMER_TEST_QNAME)
> >          .end();
> >
> > But,messages not expiring
> >
> > Please kindly help me
> >
> > *Thanks*
> > Prabu.N
> >
> >
> > On Wed, Jul 24, 2013 at 1:46 AM, Christian Mueller [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5736234&i=2>>
> wrote:
> >
> > > It's not really so difficult to find an example, if you spend only a
> few
> > > minutes:
> > >
> > >
> >
> https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerWithJMSHeaderTest.java;h=52b430b17a7ffc0ca977864ea8c6238050f90a57;hb=HEAD
> > >
> > > Best,
> > > Christian
> > > -----------------
> > >
> > > Software Integration Specialist
> > >
> > > Apache Camel committer: https://camel.apache.org/team
> > > V.P. Apache Camel: https://www.apache.org/foundation/
> > > Apache Member: https://www.apache.org/foundation/members.html
> > >
> > > https://www.linkedin.com/pub/christian-mueller/11/551/642
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736163.html
> > >  To unsubscribe from Camel routing issue, 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
> > >
> > >
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736224.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736234.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5738698.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "kraythe ." <kr...@gmail.com>.
Filter has to be first in the route. You can probably only put exception
handling and route id before it. The DSL should probably be tighened up for
that.

*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*


On Mon, Oct 7, 2013 at 12:51 PM, prabumca06@gmail.com
<pr...@gmail.com>wrote:

> Hi all,
>
> Good morning,
>
> I am trying to use when and filter both in my routing,but it didn't work
>
> I hope it will give you idea what i am trying to achieve
>
> from(ACT_TYPE_SPECFIC_QNAME).choice()
>    .when(header(EVENT_TYPE).isEqualTo(ACT_TRANSACTION))
>    .filter(simple("{body[isCredit]} == true"))
>    .process(new Processor() {
>     public void process(Exchange exchange) {
>         Map map = (Map) exchange.getIn().getBody();
>         String Account_No = (String) map.get(ACCOUNT_ID);
>         Map<String,Object> newBody = new HashMap<String, Object>();
>         newBody.put(ACCOUNT_ID, Account_No);
>         exchange.getIn().setBody(newBody);
>
>     }}).to(ACTIVATE_QNAME)
>    .endChoice()
>    .otherwise()
>    .setHeader(DESTINATION, constant(DESTINATION_VALUE))
>    .to(EROOR_QNAME)
>    .end();
>
> Message reached ACT_TYPE_SPECFIC_QNAME but it only checking when (
> .when(header(EVENT_TYPE).isEqualTo(ACT_TRANSACTION)) ) condition routing
> message to ACTIVATE_QNAME
>
> Filter not working property in this case.
>
> Please kindly help me
>
>
>
>
> On Wed, Sep 4, 2013 at 11:48 PM, Prabu <pr...@gmail.com> wrote:
>
> > Hi All,
> >
> > Camel i having code like this
> >
> > from(MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME).process(new
> > MemosProcess(*getContext().**createProducerTemplate()*))
> > .end();
> >
> > Above code worked fine in activemq 5.5 but after upgrade into active 5.8
> > it is not working.
> >
> > Message getting hang in MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME not
> > calling memosprocess class.
> >
> > Please kindly help me.
> >
> > *Thanks*
> > Prabu.N
> >
> >
> >
> > On Wed, Jul 24, 2013 at 11:49 PM, Christian Mueller [via Camel] <
> > ml-node+s465427n5736234h56@n5.nabble.com> wrote:
> >
> >> The test ensure it works:
> >>
> >> @Test
> >> public void testInOnlyJMSExpiration() throws Exception {
> >>     MockEndpoint mock = getMockEndpoint("mock:result");
> >>     mock.expectedMessageCount(1);
> >>
> >>     long ttl = System.currentTimeMillis() + 5000;
> >>
> >> template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
> >> "Hello World", "JMSExpiration", ttl);
> >>
> >>     // sleep just a little
> >>     Thread.sleep(2000);
> >>
> >>     // use timeout in case running on slow box
> >>     Exchange bar = consumer.receive("activemq:queue:bar", 10000);
> >>     assertNotNull("Should be a message on queue", bar);
> >>
> >>     template.send("activemq:queue:foo", bar);
> >>
> >>     assertMockEndpointsSatisfied();
> >> }
> >>
> >> @Test
> >> public void testInOnlyJMSExpirationNoMessage() throws Exception {
> >>     MockEndpoint mock = getMockEndpoint("mock:result");
> >>     mock.expectedMessageCount(1);
> >>
> >>     long ttl = System.currentTimeMillis() + 2000;
> >>
> >> template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
> >> "Hello World", "JMSExpiration", ttl);
> >>
> >>     // sleep more so the message is expired
> >>     Thread.sleep(5000);
> >>
> >>     Exchange bar = consumer.receiveNoWait("activemq:queue:bar");
> >>     assertNull("Should NOT be a message on queue", bar);
> >>
> >>     template.sendBody("activemq:queue:foo", "Hello World");
> >>
> >>     assertMockEndpointsSatisfied();
> >> }
> >>
> >> protected RouteBuilder createRouteBuilder() throws Exception {
> >>     return new RouteBuilder() {
> >>         public void configure() throws Exception {
> >>             from("activemq:queue:foo")
> >>                 .to("mock:result");
> >>         }
> >>     };
> >> }
> >>
> >> Check what you do differently...
> >>
> >> Best,
> >> Christian
> >> -----------------
> >>
> >> Software Integration Specialist
> >>
> >> Apache Camel committer: https://camel.apache.org/team
> >> V.P. Apache Camel: https://www.apache.org/foundation/
> >> Apache Member: https://www.apache.org/foundation/members.html
> >>
> >> https://www.linkedin.com/pub/christian-mueller/11/551/642
> >>
> >>
> >> On Wed, Jul 24, 2013 at 4:42 PM, [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5736234&i=0>
> >> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5736234&i=1
> >>wrote:
> >>
> >>
> >> > Hi Chris,
> >> >
> >> >  Thanks so much for the information.
> >> >
> >> > I have tried different property but it did not work.
> >> >
> >> > Please find my code below.
> >> >
> >> > *public static final String CONSUMER_TEST_QNAME     =
> >> >
> >> >
> >>
> "activemq:queue:ConsumerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
> >>
> >> > *
> >> > *
> >> > *
> >> > *public static final String PRODUCER_TEST_QNAME     =
> >> >
> >> >
> >>
> "activemq:queue:ProducerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
> >>
> >> > *
> >> > *    *
> >> > *public static final String
> MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME
> >>  =
> >> > "activemq:queue:Inbound.Memos.Consumer.Test";*
> >> > *
> >> > *
> >> > *public static final String
> MESSAGING_TEST_PRODUCER_TYPE_SPECIFIC_QNAME
> >>  =
> >> > "activemq:queue:Inbound.Memos.Producer.Test";*
> >> >
> >> >
> >> > from(*MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME*).process(new
> >> Processor()
> >> > {
> >> >      public void process(Exchange exchange) throws Exception {
> >> >
> >> >      }
> >> >          .setHeader(MEMOS_TARGET_SERVER,header(MASTER_HANDLER))
> >> >          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
> >> >          .to(CONSUMER_TEST_QNAME)
> >> >          .setHeader(MEMOS_TARGET_SERVER, header(SLAVE_HANDLER))
> >> >          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
> >> >          .to(CONSUMER_TEST_QNAME)
> >> >          .end();
> >> >
> >> > But,messages not expiring
> >> >
> >> > Please kindly help me
> >> >
> >> > *Thanks*
> >> > Prabu.N
> >> >
> >> >
> >> > On Wed, Jul 24, 2013 at 1:46 AM, Christian Mueller [via Camel] <
> >> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5736234&i=2
> >>
> >> wrote:
> >> >
> >> > > It's not really so difficult to find an example, if you spend only a
> >> few
> >> > > minutes:
> >> > >
> >> > >
> >> >
> >>
> https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerWithJMSHeaderTest.java;h=52b430b17a7ffc0ca977864ea8c6238050f90a57;hb=HEAD
> >> > >
> >> > > Best,
> >> > > Christian
> >> > > -----------------
> >> > >
> >> > > Software Integration Specialist
> >> > >
> >> > > Apache Camel committer: https://camel.apache.org/team
> >> > > V.P. Apache Camel: https://www.apache.org/foundation/
> >> > > Apache Member: https://www.apache.org/foundation/members.html
> >> > >
> >> > > https://www.linkedin.com/pub/christian-mueller/11/551/642
> >> > >
> >> > >
> >> > > ------------------------------
> >> > >  If you reply to this email, your message will be added to the
> >> discussion
> >> > > below:
> >> > >
> >> > >
> >> >
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736163.html
> >> > >  To unsubscribe from Camel routing issue, 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
> >> > >
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Thanks & Regards
> >> >  Prabu.N
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >> >
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736224.html
> >>
> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >
> >>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> >> discussion below:
> >>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736234.html
> >>  To unsubscribe from Camel routing issue, click here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
> >
> >> .
> >> 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
> >
> >>
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5741054.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi all,

Good morning,

I am trying to use when and filter both in my routing,but it didn't work

I hope it will give you idea what i am trying to achieve

from(ACT_TYPE_SPECFIC_QNAME).choice()
   .when(header(EVENT_TYPE).isEqualTo(ACT_TRANSACTION))
   .filter(simple("{body[isCredit]} == true"))
   .process(new Processor() {
    public void process(Exchange exchange) {
        Map map = (Map) exchange.getIn().getBody();
        String Account_No = (String) map.get(ACCOUNT_ID);
        Map<String,Object> newBody = new HashMap<String, Object>();
        newBody.put(ACCOUNT_ID, Account_No);
        exchange.getIn().setBody(newBody);

    }}).to(ACTIVATE_QNAME)
   .endChoice()
   .otherwise()
   .setHeader(DESTINATION, constant(DESTINATION_VALUE))
   .to(EROOR_QNAME)
   .end();

Message reached ACT_TYPE_SPECFIC_QNAME but it only checking when (
.when(header(EVENT_TYPE).isEqualTo(ACT_TRANSACTION)) ) condition routing
message to ACTIVATE_QNAME

Filter not working property in this case.

Please kindly help me




On Wed, Sep 4, 2013 at 11:48 PM, Prabu <pr...@gmail.com> wrote:

> Hi All,
>
> Camel i having code like this
>
> from(MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME).process(new
> MemosProcess(*getContext().**createProducerTemplate()*))
> .end();
>
> Above code worked fine in activemq 5.5 but after upgrade into active 5.8
> it is not working.
>
> Message getting hang in MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME not
> calling memosprocess class.
>
> Please kindly help me.
>
> *Thanks*
> Prabu.N
>
>
>
> On Wed, Jul 24, 2013 at 11:49 PM, Christian Mueller [via Camel] <
> ml-node+s465427n5736234h56@n5.nabble.com> wrote:
>
>> The test ensure it works:
>>
>> @Test
>> public void testInOnlyJMSExpiration() throws Exception {
>>     MockEndpoint mock = getMockEndpoint("mock:result");
>>     mock.expectedMessageCount(1);
>>
>>     long ttl = System.currentTimeMillis() + 5000;
>>
>> template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
>> "Hello World", "JMSExpiration", ttl);
>>
>>     // sleep just a little
>>     Thread.sleep(2000);
>>
>>     // use timeout in case running on slow box
>>     Exchange bar = consumer.receive("activemq:queue:bar", 10000);
>>     assertNotNull("Should be a message on queue", bar);
>>
>>     template.send("activemq:queue:foo", bar);
>>
>>     assertMockEndpointsSatisfied();
>> }
>>
>> @Test
>> public void testInOnlyJMSExpirationNoMessage() throws Exception {
>>     MockEndpoint mock = getMockEndpoint("mock:result");
>>     mock.expectedMessageCount(1);
>>
>>     long ttl = System.currentTimeMillis() + 2000;
>>
>> template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
>> "Hello World", "JMSExpiration", ttl);
>>
>>     // sleep more so the message is expired
>>     Thread.sleep(5000);
>>
>>     Exchange bar = consumer.receiveNoWait("activemq:queue:bar");
>>     assertNull("Should NOT be a message on queue", bar);
>>
>>     template.sendBody("activemq:queue:foo", "Hello World");
>>
>>     assertMockEndpointsSatisfied();
>> }
>>
>> protected RouteBuilder createRouteBuilder() throws Exception {
>>     return new RouteBuilder() {
>>         public void configure() throws Exception {
>>             from("activemq:queue:foo")
>>                 .to("mock:result");
>>         }
>>     };
>> }
>>
>> Check what you do differently...
>>
>> Best,
>> Christian
>> -----------------
>>
>> Software Integration Specialist
>>
>> Apache Camel committer: https://camel.apache.org/team
>> V.P. Apache Camel: https://www.apache.org/foundation/
>> Apache Member: https://www.apache.org/foundation/members.html
>>
>> https://www.linkedin.com/pub/christian-mueller/11/551/642
>>
>>
>> On Wed, Jul 24, 2013 at 4:42 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5736234&i=0>
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5736234&i=1>>wrote:
>>
>>
>> > Hi Chris,
>> >
>> >  Thanks so much for the information.
>> >
>> > I have tried different property but it did not work.
>> >
>> > Please find my code below.
>> >
>> > *public static final String CONSUMER_TEST_QNAME     =
>> >
>> >
>> "activemq:queue:ConsumerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
>>
>> > *
>> > *
>> > *
>> > *public static final String PRODUCER_TEST_QNAME     =
>> >
>> >
>> "activemq:queue:ProducerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
>>
>> > *
>> > *    *
>> > *public static final String MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME
>>  =
>> > "activemq:queue:Inbound.Memos.Consumer.Test";*
>> > *
>> > *
>> > *public static final String MESSAGING_TEST_PRODUCER_TYPE_SPECIFIC_QNAME
>>  =
>> > "activemq:queue:Inbound.Memos.Producer.Test";*
>> >
>> >
>> > from(*MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME*).process(new
>> Processor()
>> > {
>> >      public void process(Exchange exchange) throws Exception {
>> >
>> >      }
>> >          .setHeader(MEMOS_TARGET_SERVER,header(MASTER_HANDLER))
>> >          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
>> >          .to(CONSUMER_TEST_QNAME)
>> >          .setHeader(MEMOS_TARGET_SERVER, header(SLAVE_HANDLER))
>> >          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
>> >          .to(CONSUMER_TEST_QNAME)
>> >          .end();
>> >
>> > But,messages not expiring
>> >
>> > Please kindly help me
>> >
>> > *Thanks*
>> > Prabu.N
>> >
>> >
>> > On Wed, Jul 24, 2013 at 1:46 AM, Christian Mueller [via Camel] <
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5736234&i=2>>
>> wrote:
>> >
>> > > It's not really so difficult to find an example, if you spend only a
>> few
>> > > minutes:
>> > >
>> > >
>> >
>> https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerWithJMSHeaderTest.java;h=52b430b17a7ffc0ca977864ea8c6238050f90a57;hb=HEAD
>> > >
>> > > Best,
>> > > Christian
>> > > -----------------
>> > >
>> > > Software Integration Specialist
>> > >
>> > > Apache Camel committer: https://camel.apache.org/team
>> > > V.P. Apache Camel: https://www.apache.org/foundation/
>> > > Apache Member: https://www.apache.org/foundation/members.html
>> > >
>> > > https://www.linkedin.com/pub/christian-mueller/11/551/642
>> > >
>> > >
>> > > ------------------------------
>> > >  If you reply to this email, your message will be added to the
>> discussion
>> > > below:
>> > >
>> > >
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736163.html
>> > >  To unsubscribe from Camel routing issue, 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
>> > >
>> > >
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> >  Prabu.N
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736224.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736234.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5741053.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by Christian Müller <ch...@gmail.com>.
The test ensure it works:

@Test
public void testInOnlyJMSExpiration() throws Exception {
    MockEndpoint mock = getMockEndpoint("mock:result");
    mock.expectedMessageCount(1);

    long ttl = System.currentTimeMillis() + 5000;

template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
"Hello World", "JMSExpiration", ttl);

    // sleep just a little
    Thread.sleep(2000);

    // use timeout in case running on slow box
    Exchange bar = consumer.receive("activemq:queue:bar", 10000);
    assertNotNull("Should be a message on queue", bar);

    template.send("activemq:queue:foo", bar);

    assertMockEndpointsSatisfied();
}

@Test
public void testInOnlyJMSExpirationNoMessage() throws Exception {
    MockEndpoint mock = getMockEndpoint("mock:result");
    mock.expectedMessageCount(1);

    long ttl = System.currentTimeMillis() + 2000;

template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
"Hello World", "JMSExpiration", ttl);

    // sleep more so the message is expired
    Thread.sleep(5000);

    Exchange bar = consumer.receiveNoWait("activemq:queue:bar");
    assertNull("Should NOT be a message on queue", bar);

    template.sendBody("activemq:queue:foo", "Hello World");

    assertMockEndpointsSatisfied();
}

protected RouteBuilder createRouteBuilder() throws Exception {
    return new RouteBuilder() {
        public void configure() throws Exception {
            from("activemq:queue:foo")
                .to("mock:result");
        }
    };
}

Check what you do differently...

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Wed, Jul 24, 2013 at 4:42 PM, prabumca06@gmail.com
<pr...@gmail.com>wrote:

> Hi Chris,
>
>  Thanks so much for the information.
>
> I have tried different property but it did not work.
>
> Please find my code below.
>
> *public static final String CONSUMER_TEST_QNAME     =
>
> "activemq:queue:ConsumerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
> *
> *
> *
> *public static final String PRODUCER_TEST_QNAME     =
>
> "activemq:queue:ProducerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
> *
> *    *
> *public static final String MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME  =
> "activemq:queue:Inbound.Memos.Consumer.Test";*
> *
> *
> *public static final String MESSAGING_TEST_PRODUCER_TYPE_SPECIFIC_QNAME  =
> "activemq:queue:Inbound.Memos.Producer.Test";*
>
>
> from(*MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME*).process(new Processor()
> {
>      public void process(Exchange exchange) throws Exception {
>
>      }
>          .setHeader(MEMOS_TARGET_SERVER,header(MASTER_HANDLER))
>          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
>          .to(CONSUMER_TEST_QNAME)
>          .setHeader(MEMOS_TARGET_SERVER, header(SLAVE_HANDLER))
>          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
>          .to(CONSUMER_TEST_QNAME)
>          .end();
>
> But,messages not expiring
>
> Please kindly help me
>
> *Thanks*
> Prabu.N
>
>
> On Wed, Jul 24, 2013 at 1:46 AM, Christian Mueller [via Camel] <
> ml-node+s465427n5736163h55@n5.nabble.com> wrote:
>
> > It's not really so difficult to find an example, if you spend only a few
> > minutes:
> >
> >
> https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerWithJMSHeaderTest.java;h=52b430b17a7ffc0ca977864ea8c6238050f90a57;hb=HEAD
> >
> > Best,
> > Christian
> > -----------------
> >
> > Software Integration Specialist
> >
> > Apache Camel committer: https://camel.apache.org/team
> > V.P. Apache Camel: https://www.apache.org/foundation/
> > Apache Member: https://www.apache.org/foundation/members.html
> >
> > https://www.linkedin.com/pub/christian-mueller/11/551/642
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736163.html
> >  To unsubscribe from Camel routing issue, click here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
> >
> > .
> > 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
> >
> >
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736224.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi Chris,

 Thanks so much for the information.

I have tried different property but it did not work.

Please find my code below.

*public static final String CONSUMER_TEST_QNAME     =
"activemq:queue:ConsumerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
*
*
*
*public static final String PRODUCER_TEST_QNAME     =
"activemq:queue:ProducerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
*
*    *
*public static final String MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME  =
"activemq:queue:Inbound.Memos.Consumer.Test";*
*
*
*public static final String MESSAGING_TEST_PRODUCER_TYPE_SPECIFIC_QNAME  =
"activemq:queue:Inbound.Memos.Producer.Test";*


from(*MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME*).process(new Processor()
{
     public void process(Exchange exchange) throws Exception {

     }
         .setHeader(MEMOS_TARGET_SERVER,header(MASTER_HANDLER))
         .setHeader(JMSExpiration,constant(EXPIRY_TIME))
         .to(CONSUMER_TEST_QNAME)
         .setHeader(MEMOS_TARGET_SERVER, header(SLAVE_HANDLER))
         .setHeader(JMSExpiration,constant(EXPIRY_TIME))
         .to(CONSUMER_TEST_QNAME)
         .end();

But,messages not expiring

Please kindly help me

*Thanks*
Prabu.N


On Wed, Jul 24, 2013 at 1:46 AM, Christian Mueller [via Camel] <
ml-node+s465427n5736163h55@n5.nabble.com> wrote:

> It's not really so difficult to find an example, if you spend only a few
> minutes:
>
> https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerWithJMSHeaderTest.java;h=52b430b17a7ffc0ca977864ea8c6238050f90a57;hb=HEAD
>
> Best,
> Christian
> -----------------
>
> Software Integration Specialist
>
> Apache Camel committer: https://camel.apache.org/team
> V.P. Apache Camel: https://www.apache.org/foundation/
> Apache Member: https://www.apache.org/foundation/members.html
>
> https://www.linkedin.com/pub/christian-mueller/11/551/642
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736163.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736224.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by Christian Müller <ch...@gmail.com>.
It's not really so difficult to find an example, if you spend only a few
minutes:
https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerWithJMSHeaderTest.java;h=52b430b17a7ffc0ca977864ea8c6238050f90a57;hb=HEAD

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Please kindly provide some sample code.

*Thanks*
Prabu.N


On Tue, Jul 23, 2013 at 7:04 PM, Prabu <pr...@gmail.com> wrote:

> if you don't mind can you provide sample how to use this property to set
> jmsExpiration time for messages
>
>
> *Thanks*
> Prabu.N
>
>
> On Tue, Jul 23, 2013 at 6:48 PM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5736125h77@n5.nabble.com> wrote:
>
>> Hi
>>
>> Have you read about the preserveMessageQos option?
>> http://camel.apache.org/jms
>>
>>
>> On Tue, Jul 23, 2013 at 1:39 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=0>
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5736125&i=1>>
>> wrote:
>>
>> > Hi
>> >
>> > I need one help,I want set JMSExpiration value before routing messages.
>> >
>> > i tried setting JMSExpiration in .setHeader
>> >
>> > But it didn't work.I still seeing JMSExpiration is zero.
>> >
>> > *Thanks*
>> > Prabu.N
>> >
>> >
>> > On Wed, Apr 24, 2013 at 9:28 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=2>>
>> wrote:
>> >
>> >> Please kindly help me.
>> >>
>> >>
>> >> Regards
>> >> Prabu.N
>> >>
>> >>
>> >> On Wed, Apr 24, 2013 at 2:54 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=3>>
>> wrote:
>> >>
>> >>> Hi All,
>> >>>
>> >>> I am facing some issue in my camel code.
>> >>>
>> >>> Initially i have used java code to route messages from one end to
>> another
>> >>> end.
>> >>>
>> >>> I modified code to route message using camel routing insight of java
>> code.
>> >>>
>> >>> After modified code,i am facing issue in my code.
>> >>>
>> >>> 500 Messages stored in DLQ.testQueue
>> >>>
>> >>> When i try to re-delivery all 500 messages using active-mq API
>> *moveMessageTo
>> >>> method.*
>> >>>
>> >>> 250 or 200 or 100 messages still i can see in DLQ.testQueue.
>> >>>
>> >>> I feel messages re-delivering,But due to some message coming back
>> again
>> >>> into DLQ.
>> >>>
>> >>> Please kindly help me.
>> >>>
>> >>> *Regards*
>> >>> Prabu.N
>> >>>
>> >>>
>> >>> On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
>> >>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5736125&i=4>>
>> wrote:
>> >>>
>> >>>> Hi
>> >>>>
>> >>>> Looks like java needs a hand[1], after
>> >>>> .to(SCHEDULE_QNAME,ONLINE__QNAME),
>> >>>> you can try endChoice()
>> >>>>
>> >>>> [1]
>> >>>>
>> >>>>
>> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
>> >>>>
>> >>>> Taariq
>> >>>>
>> >>>>
>> >>>> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<
>> http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
>> >>>> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
>> >>>> > wrote:
>> >>>>
>> >>>> > Thanks Claus for your response..
>> >>>> >
>> >>>> > I facing some issue in below code
>> >>>> >
>> >>>> > if condition satisfy i want forward into 2 queues,If not it check
>> >>>> second
>> >>>> > condition forward into next queue.
>> >>>> >
>> >>>> >     from(SURVEYINVITATION_QNAME).choice()
>> >>>> > *          .when(SCHEDULE_PREDICATE)*
>> >>>> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
>> >>>> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
>> >>>> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
>> >>>> >           .otherwise()
>> >>>> >               .to(ERQ_QNAME)
>> >>>> >          .end();
>> >>>> >
>> >>>> >
>> >>>> > I am getting compilation error,Please correct me what mistake i am
>> >>>> making
>> >>>> > here
>> >>>> >
>> >>>> > *Regards*
>> >>>> > Prabu.N
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
>> >>>> > [hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
>> >>>> wrote:
>> >>>> >
>> >>>> > > Hi
>> >>>> > >
>> >>>> > > If no destinations is returned, then the message is not routed
>> >>>> anywhere.
>> >>>> > >
>> >>>> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
>> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
>> >>>> > > <[hidden email] <
>> >>>> http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
>> >>>> > > wrote:
>> >>>> > >
>> >>>> > > > *One quick question.*
>> >>>> > > >
>> >>>> > > >
>> >>>> > >
>> >>>> >
>> >>>>
>> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>>
>> >>>>
>> >>>> > >
>> >>>> > > >
>> >>>> > > > @RecipientList()
>> >>>> > > >  public Set<String> routeTo(Exchange ex) {
>> >>>> > > >
>> >>>> > > >  final Set<String> destinations = new HashSet<String>();
>> >>>> > > >
>> >>>> > > >  //based on condition we add messages header/content ,We add
>> queue
>> >>>> > names
>> >>>> > > in
>> >>>> > > > destinations varible.
>> >>>> > > >  //destinations.add("activemq:queue:listqueue")
>> >>>> > > >
>> >>>> > > >   return destinations;
>> >>>> > > >  }
>> >>>> > > >
>> >>>> > > > some cases,messages content not satisfy any condition and it
>> >>>> returning
>> >>>> > > > empty destinations set.
>> >>>> > > >
>> >>>> > > > If destinations set is empty where message will go?.
>> >>>> > > >
>> >>>> > > > Because,i can't see messages in HHH.InboundQueue and any
>> queues.
>> >>>> > > >
>> >>>> > > > *Regards*
>> >>>> > > > Prabu.N
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
>> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
>> >>>> > > wrote:
>> >>>> > > >
>> >>>> > > >> So for dynamic queue i have to use only recipientlist
>> correct,we
>> >>>> can't
>> >>>> > > use
>> >>>> > > >> .to
>> >>>> > > >>
>> >>>> > > >> One more question,i can't use otherwise in choice please
>> correct
>> >>>> if my
>> >>>> > > >> syntax is wrong.
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >> from(INBOUND_QUEUE)
>> >>>> > > >> .choice().when(header(TYPE).isNotNull())
>> >>>> > > >>
>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> >>>> > > >> .otherwise()
>> >>>> > > >>    .to(ERQ_QNAME)
>> >>>> > > >> .endChoice();
>> >>>> > > >>
>> >>>> > > >> After execute i am getting following error.
>> >>>> > > >>
>> >>>> > > >> Error:
>> >>>> > > >>
>> >>>> > > >> Router.java:22: cannot find symbol
>> >>>> > > >> symbol  : method otherwise()
>> >>>> > > >> location: class
>> >>>> > > >>
>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> >>>> > > >> model.ChoiceDefinition>
>> >>>> > > >>            .otherwise()
>> >>>> > > >>            ^
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
>> >>>> > > >> [hidden email] <
>> >>>> http://user/SendEmail.jtp?type=node&node=5731013&i=3
>> >>>>
>> >>>> > >>
>> >>>> > > wrote:
>> >>>> > > >>
>> >>>> > > >>> Hi
>> >>>> > > >>>
>> >>>> > > >>> Yes recipient list uses an expression for evaluating where
>> to
>> >>>> send
>> >>>> > the
>> >>>> > > >>> message to.
>> >>>> > > >>> See its doc
>> >>>> > > >>> http://camel.apache.org/recipient-list.html
>> >>>> > > >>>
>> >>>> > > >>> And this FAQ
>> >>>> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> >>>> > > >>>
>> >>>> > > >>> And there is no performance overhead. eg when you send the
>> >>>> message to
>> >>>> > > >>> a previous destination, then that endpoints/producer is
>> reused.
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
>> >>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
>> >>>> > > >>> <[hidden email] <
>> >>>> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>> >>>> > >
>> >>>> > > >>> wrote:
>> >>>> > > >>>
>> >>>> > > >>> > Question:1
>> >>>> > > >>> >
>> >>>> > > >>> > I am having code like blow.based on condition i want
>> forward
>> >>>> into
>> >>>> > > >>> dynamic
>> >>>> > > >>> > queue.
>> >>>> > > >>> >
>> >>>> > > >>> >  .when(header(TYPE).isNotNull())
>> >>>> > > >>> >
>> >>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> >>>> > > >>> >
>> >>>> > > >>> > i want to use .to(simple ) insight of
>> .recipientList(simple)
>> >>>> > > >>> >
>> >>>> > > >>> > Please suggest is it possible?.why it is not possible is
>> there
>> >>>> any
>> >>>> > > >>> > performance issue if i use .recipientList(simple)
>> >>>> > > >>> >
>> >>>> > > >>> > Questuon:2
>> >>>> > > >>> >
>> >>>> > > >>> > Error in code
>> >>>> > > >>> >
>> >>>> > > >>> > from(INBOUND_QUEUE)
>> >>>> > > >>> > .choice().when(header(TYPE).isNotNull())
>> >>>> > > >>> >
>> >>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> >>>> > > >>> > .otherwise()
>> >>>> > > >>> >    .to(ERQ_QNAME)
>> >>>> > > >>> > .endChoice();
>> >>>> > > >>> >
>> >>>> > > >>> > After execute i am getting following error.
>> >>>> > > >>> >
>> >>>> > > >>> > Error:
>> >>>> > > >>> >
>> >>>> > > >>> > Router.java:22: cannot find symbol
>> >>>> > > >>> > symbol  : method otherwise()
>> >>>> > > >>> > location: class
>> >>>> > > >>> >
>> >>>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> >>>> > > >>> > model.ChoiceDefinition>
>> >>>> > > >>> >            .otherwise()
>> >>>> > > >>> >            ^
>> >>>> > > >>> >
>> >>>> > > >>> > Question:3
>> >>>> > > >>> >
>> >>>> > > >>> > I having more than 85 queues.Based on condition i want to
>> >>>> forward
>> >>>> > to
>> >>>> > > >>> correct
>> >>>> > > >>> > queue.
>> >>>> > > >>> >
>> >>>> > > >>> > In my route builder i having code below for all 85 queus.
>> >>>> > > >>> >
>> >>>> > > >>> >   from(ALERT_QNAME).choice()
>> >>>> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>> >>>> > > >>> >           .otherwise()
>> >>>> > > >>> >           .to(ERQ_QNAME)
>> >>>> > > >>> >  .end();
>> >>>> > > >>> >
>> >>>> > > >>> > I feel like because of my code performance getting
>> >>>> degrade.Please
>> >>>> > > >>> suggest if
>> >>>> > > >>> > i am wrong?
>> >>>> > > >>> >
>> >>>> > > >>> > When i open jconsole i am getting white screen and queues
>> some
>> >>>> time
>> >>>> > > not
>> >>>> > > >>> > showing any attribute?
>> >>>> > > >>> >
>> >>>> > > >>> > Please kindly help me.
>> >>>> > > >>> >
>> >>>> > > >>> >
>> >>>> > > >>> >
>> >>>> > > >>> > --
>> >>>> > > >>> > View this message in context:
>> >>>> > > >>>
>> >>>> > >
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>> >>>> > > >>>
>> >>>> > > >>> > Sent from the Camel - Users mailing list archive at
>> >>>> Nabble.com.
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>> --
>> >>>> > > >>> Claus Ibsen
>> >>>> > > >>> -----------------
>> >>>> > > >>> Red Hat, Inc.
>> >>>> > > >>> FuseSource is now part of Red Hat
>> >>>> > > >>> Email: [hidden email]<
>> >>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
>> >>>> > > >>> Web: http://fusesource.com
>> >>>> > > >>> Twitter: davsclaus
>> >>>> > > >>> Blog: http://davsclaus.com
>> >>>> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>> ------------------------------
>> >>>> > > >>>  If you reply to this email, your message will be added to
>> the
>> >>>> > > >>> discussion below:
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > >
>> >>>> > > >>> .
>> >>>> > > >>> 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
>> >>>> > >
>> >>>> > >
>> >>>> > > >>>
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >> --
>> >>>> > > >> Thanks & Regards
>> >>>> > > >>  Prabu.N
>> >>>> > > >>
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > > --
>> >>>> > > > Thanks & Regards
>> >>>> > > >  Prabu.N
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > > --
>> >>>> > > > View this message in context:
>> >>>> > >
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
>> >>>> > >
>> >>>> > > > Sent from the Camel - Users mailing list archive at
>> Nabble.com.
>> >>>> > >
>> >>>> > >
>> >>>> > >
>> >>>> > > --
>> >>>> > > Claus Ibsen
>> >>>> > > -----------------
>> >>>> > > Red Hat, Inc.
>> >>>> > > FuseSource is now part of Red Hat
>> >>>> > > Email: [hidden email]<
>> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
>> >>>> > > Web: http://fusesource.com
>> >>>> > > Twitter: davsclaus
>> >>>> > > Blog: http://davsclaus.com
>> >>>> > > Author of Camel in Action: http://www.manning.com/ibsen
>> >>>> > >
>> >>>> > >
>> >>>> > > ------------------------------
>> >>>> > >  If you reply to this email, your message will be added to the
>> >>>> discussion
>> >>>> > > below:
>> >>>> > >
>> >>>> > >
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
>> >>>> > >  To unsubscribe from Camel routing issue, 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
>> >>>> > >
>> >>>> > >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > --
>> >>>> > Thanks & Regards
>> >>>> >  Prabu.N
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > --
>> >>>> > View this message in context:
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
>> >>>>
>> >>>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>>> >
>> >>>>
>> >>>>
>> >>>> ------------------------------
>> >>>>  If you reply to this email, your message will be added to the
>> >>>> discussion below:
>> >>>>
>> >>>>
>>
>> >>>> .
>> >>>> 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>
>>
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Thanks & Regards
>> >>>  Prabu.N
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Thanks & Regards
>> >>  Prabu.N
>> >>
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> >  Prabu.N
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736112.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=5>
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736125.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736140.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Please kindly help me.


Regards
Prabu.N


On Wed, Apr 24, 2013 at 2:54 PM, Prabu <pr...@gmail.com> wrote:

> Hi All,
>
> I am facing some issue in my camel code.
>
> Initially i have used java code to route messages from one end to another
> end.
>
> I modified code to route message using camel routing insight of java code.
>
> After modified code,i am facing issue in my code.
>
> 500 Messages stored in DLQ.testQueue
>
> When i try to re-delivery all 500 messages using active-mq API *moveMessageTo
> method.*
>
> 250 or 200 or 100 messages still i can see in DLQ.testQueue.
>
> I feel messages re-delivering,But due to some message coming back again
> into DLQ.
>
> Please kindly help me.
>
> *Regards*
> Prabu.N
>
>
> On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
> ml-node+s465427n5731018h60@n5.nabble.com> wrote:
>
>> Hi
>>
>> Looks like java needs a hand[1], after .to(SCHEDULE_QNAME,ONLINE__QNAME),
>> you can try endChoice()
>>
>> [1]
>>
>> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
>>
>> Taariq
>>
>>
>> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
>> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
>> > wrote:
>>
>> > Thanks Claus for your response..
>> >
>> > I facing some issue in below code
>> >
>> > if condition satisfy i want forward into 2 queues,If not it check
>> second
>> > condition forward into next queue.
>> >
>> >     from(SURVEYINVITATION_QNAME).choice()
>> > *          .when(SCHEDULE_PREDICATE)*
>> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
>> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
>> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
>> >           .otherwise()
>> >               .to(ERQ_QNAME)
>> >          .end();
>> >
>> >
>> > I am getting compilation error,Please correct me what mistake i am
>> making
>> > here
>> >
>> > *Regards*
>> > Prabu.N
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
>> wrote:
>> >
>> > > Hi
>> > >
>> > > If no destinations is returned, then the message is not routed
>> anywhere.
>> > >
>> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
>> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
>> > > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
>>
>> > > wrote:
>> > >
>> > > > *One quick question.*
>> > > >
>> > > >
>> > >
>> >
>> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>>
>> > >
>> > > >
>> > > > @RecipientList()
>> > > >  public Set<String> routeTo(Exchange ex) {
>> > > >
>> > > >  final Set<String> destinations = new HashSet<String>();
>> > > >
>> > > >  //based on condition we add messages header/content ,We add queue
>> > names
>> > > in
>> > > > destinations varible.
>> > > >  //destinations.add("activemq:queue:listqueue")
>> > > >
>> > > >   return destinations;
>> > > >  }
>> > > >
>> > > > some cases,messages content not satisfy any condition and it
>> returning
>> > > > empty destinations set.
>> > > >
>> > > > If destinations set is empty where message will go?.
>> > > >
>> > > > Because,i can't see messages in HHH.InboundQueue and any queues.
>> > > >
>> > > > *Regards*
>> > > > Prabu.N
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
>> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
>> > > wrote:
>> > > >
>> > > >> So for dynamic queue i have to use only recipientlist correct,we
>> can't
>> > > use
>> > > >> .to
>> > > >>
>> > > >> One more question,i can't use otherwise in choice please correct
>> if my
>> > > >> syntax is wrong.
>> > > >>
>> > > >>
>> > > >> from(INBOUND_QUEUE)
>> > > >> .choice().when(header(TYPE).isNotNull())
>> > > >>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> > > >> .otherwise()
>> > > >>    .to(ERQ_QNAME)
>> > > >> .endChoice();
>> > > >>
>> > > >> After execute i am getting following error.
>> > > >>
>> > > >> Error:
>> > > >>
>> > > >> Router.java:22: cannot find symbol
>> > > >> symbol  : method otherwise()
>> > > >> location: class
>> > > >> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> > > >> model.ChoiceDefinition>
>> > > >>            .otherwise()
>> > > >>            ^
>> > > >>
>> > > >>
>> > > >>
>> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
>> > > >> [hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5731013&i=3
>>
>> > >>
>> > > wrote:
>> > > >>
>> > > >>> Hi
>> > > >>>
>> > > >>> Yes recipient list uses an expression for evaluating where to
>> send
>> > the
>> > > >>> message to.
>> > > >>> See its doc
>> > > >>> http://camel.apache.org/recipient-list.html
>> > > >>>
>> > > >>> And this FAQ
>> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> > > >>>
>> > > >>> And there is no performance overhead. eg when you send the
>> message to
>> > > >>> a previous destination, then that endpoints/producer is reused.
>> > > >>>
>> > > >>>
>> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
>> > > >>> <[hidden email] <
>> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>> > >
>> > > >>> wrote:
>> > > >>>
>> > > >>> > Question:1
>> > > >>> >
>> > > >>> > I am having code like blow.based on condition i want forward
>> into
>> > > >>> dynamic
>> > > >>> > queue.
>> > > >>> >
>> > > >>> >  .when(header(TYPE).isNotNull())
>> > > >>> >
>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> > > >>> >
>> > > >>> > i want to use .to(simple ) insight of .recipientList(simple)
>> > > >>> >
>> > > >>> > Please suggest is it possible?.why it is not possible is there
>> any
>> > > >>> > performance issue if i use .recipientList(simple)
>> > > >>> >
>> > > >>> > Questuon:2
>> > > >>> >
>> > > >>> > Error in code
>> > > >>> >
>> > > >>> > from(INBOUND_QUEUE)
>> > > >>> > .choice().when(header(TYPE).isNotNull())
>> > > >>> >
>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> > > >>> > .otherwise()
>> > > >>> >    .to(ERQ_QNAME)
>> > > >>> > .endChoice();
>> > > >>> >
>> > > >>> > After execute i am getting following error.
>> > > >>> >
>> > > >>> > Error:
>> > > >>> >
>> > > >>> > Router.java:22: cannot find symbol
>> > > >>> > symbol  : method otherwise()
>> > > >>> > location: class
>> > > >>> >
>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> > > >>> > model.ChoiceDefinition>
>> > > >>> >            .otherwise()
>> > > >>> >            ^
>> > > >>> >
>> > > >>> > Question:3
>> > > >>> >
>> > > >>> > I having more than 85 queues.Based on condition i want to
>> forward
>> > to
>> > > >>> correct
>> > > >>> > queue.
>> > > >>> >
>> > > >>> > In my route builder i having code below for all 85 queus.
>> > > >>> >
>> > > >>> >   from(ALERT_QNAME).choice()
>> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>> > > >>> >           .otherwise()
>> > > >>> >           .to(ERQ_QNAME)
>> > > >>> >  .end();
>> > > >>> >
>> > > >>> > I feel like because of my code performance getting
>> degrade.Please
>> > > >>> suggest if
>> > > >>> > i am wrong?
>> > > >>> >
>> > > >>> > When i open jconsole i am getting white screen and queues some
>> time
>> > > not
>> > > >>> > showing any attribute?
>> > > >>> >
>> > > >>> > Please kindly help me.
>> > > >>> >
>> > > >>> >
>> > > >>> >
>> > > >>> > --
>> > > >>> > View this message in context:
>> > > >>>
>> > >
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>> > > >>>
>> > > >>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> > > >>>
>> > > >>>
>> > > >>>
>> > > >>> --
>> > > >>> Claus Ibsen
>> > > >>> -----------------
>> > > >>> Red Hat, Inc.
>> > > >>> FuseSource is now part of Red Hat
>> > > >>> Email: [hidden email]<
>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
>> > > >>> Web: http://fusesource.com
>> > > >>> Twitter: davsclaus
>> > > >>> Blog: http://davsclaus.com
>> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
>> > > >>>
>> > > >>>
>> > > >>> ------------------------------
>> > > >>>  If you reply to this email, your message will be added to the
>> > > >>> discussion below:
>> > > >>>
>> > > >>>
>> > >
>> > > >>> .
>> > > >>> 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
>> > >
>> > >
>> > > >>>
>> > > >>
>> > > >>
>> > > >>
>> > > >> --
>> > > >> Thanks & Regards
>> > > >>  Prabu.N
>> > > >>
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Thanks & Regards
>> > > >  Prabu.N
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > View this message in context:
>> > >
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
>> > >
>> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
>> > >
>> > >
>> > >
>> > > --
>> > > Claus Ibsen
>> > > -----------------
>> > > Red Hat, Inc.
>> > > FuseSource is now part of Red Hat
>> > > Email: [hidden email]<
>> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
>> > > Web: http://fusesource.com
>> > > Twitter: davsclaus
>> > > Blog: http://davsclaus.com
>> > > Author of Camel in Action: http://www.manning.com/ibsen
>> > >
>> > >
>> > > ------------------------------
>> > >  If you reply to this email, your message will be added to the
>> discussion
>> > > below:
>> > >
>> > >
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
>> > >  To unsubscribe from Camel routing issue, 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
>> > >
>> > >
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> >  Prabu.N
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731018.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731462.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Please kindly provide some sample code.

*Thanks*
Prabu.N


On Tue, Jul 23, 2013 at 7:04 PM, Prabu <pr...@gmail.com> wrote:

> if you don't mind can you provide sample how to use this property to set
> jmsExpiration time for messages
>
>
> *Thanks*
> Prabu.N
>
>
> On Tue, Jul 23, 2013 at 6:48 PM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5736125h77@n5.nabble.com> wrote:
>
>> Hi
>>
>> Have you read about the preserveMessageQos option?
>> http://camel.apache.org/jms
>>
>>
>> On Tue, Jul 23, 2013 at 1:39 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=0>
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5736125&i=1>>
>> wrote:
>>
>> > Hi
>> >
>> > I need one help,I want set JMSExpiration value before routing messages.
>> >
>> > i tried setting JMSExpiration in .setHeader
>> >
>> > But it didn't work.I still seeing JMSExpiration is zero.
>> >
>> > *Thanks*
>> > Prabu.N
>> >
>> >
>> > On Wed, Apr 24, 2013 at 9:28 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=2>>
>> wrote:
>> >
>> >> Please kindly help me.
>> >>
>> >>
>> >> Regards
>> >> Prabu.N
>> >>
>> >>
>> >> On Wed, Apr 24, 2013 at 2:54 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=3>>
>> wrote:
>> >>
>> >>> Hi All,
>> >>>
>> >>> I am facing some issue in my camel code.
>> >>>
>> >>> Initially i have used java code to route messages from one end to
>> another
>> >>> end.
>> >>>
>> >>> I modified code to route message using camel routing insight of java
>> code.
>> >>>
>> >>> After modified code,i am facing issue in my code.
>> >>>
>> >>> 500 Messages stored in DLQ.testQueue
>> >>>
>> >>> When i try to re-delivery all 500 messages using active-mq API
>> *moveMessageTo
>> >>> method.*
>> >>>
>> >>> 250 or 200 or 100 messages still i can see in DLQ.testQueue.
>> >>>
>> >>> I feel messages re-delivering,But due to some message coming back
>> again
>> >>> into DLQ.
>> >>>
>> >>> Please kindly help me.
>> >>>
>> >>> *Regards*
>> >>> Prabu.N
>> >>>
>> >>>
>> >>> On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
>> >>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5736125&i=4>>
>> wrote:
>> >>>
>> >>>> Hi
>> >>>>
>> >>>> Looks like java needs a hand[1], after
>> >>>> .to(SCHEDULE_QNAME,ONLINE__QNAME),
>> >>>> you can try endChoice()
>> >>>>
>> >>>> [1]
>> >>>>
>> >>>>
>> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
>> >>>>
>> >>>> Taariq
>> >>>>
>> >>>>
>> >>>> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<
>> http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
>> >>>> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
>> >>>> > wrote:
>> >>>>
>> >>>> > Thanks Claus for your response..
>> >>>> >
>> >>>> > I facing some issue in below code
>> >>>> >
>> >>>> > if condition satisfy i want forward into 2 queues,If not it check
>> >>>> second
>> >>>> > condition forward into next queue.
>> >>>> >
>> >>>> >     from(SURVEYINVITATION_QNAME).choice()
>> >>>> > *          .when(SCHEDULE_PREDICATE)*
>> >>>> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
>> >>>> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
>> >>>> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
>> >>>> >           .otherwise()
>> >>>> >               .to(ERQ_QNAME)
>> >>>> >          .end();
>> >>>> >
>> >>>> >
>> >>>> > I am getting compilation error,Please correct me what mistake i am
>> >>>> making
>> >>>> > here
>> >>>> >
>> >>>> > *Regards*
>> >>>> > Prabu.N
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
>> >>>> > [hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
>> >>>> wrote:
>> >>>> >
>> >>>> > > Hi
>> >>>> > >
>> >>>> > > If no destinations is returned, then the message is not routed
>> >>>> anywhere.
>> >>>> > >
>> >>>> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
>> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
>> >>>> > > <[hidden email] <
>> >>>> http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
>> >>>> > > wrote:
>> >>>> > >
>> >>>> > > > *One quick question.*
>> >>>> > > >
>> >>>> > > >
>> >>>> > >
>> >>>> >
>> >>>>
>> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>>
>> >>>>
>> >>>> > >
>> >>>> > > >
>> >>>> > > > @RecipientList()
>> >>>> > > >  public Set<String> routeTo(Exchange ex) {
>> >>>> > > >
>> >>>> > > >  final Set<String> destinations = new HashSet<String>();
>> >>>> > > >
>> >>>> > > >  //based on condition we add messages header/content ,We add
>> queue
>> >>>> > names
>> >>>> > > in
>> >>>> > > > destinations varible.
>> >>>> > > >  //destinations.add("activemq:queue:listqueue")
>> >>>> > > >
>> >>>> > > >   return destinations;
>> >>>> > > >  }
>> >>>> > > >
>> >>>> > > > some cases,messages content not satisfy any condition and it
>> >>>> returning
>> >>>> > > > empty destinations set.
>> >>>> > > >
>> >>>> > > > If destinations set is empty where message will go?.
>> >>>> > > >
>> >>>> > > > Because,i can't see messages in HHH.InboundQueue and any
>> queues.
>> >>>> > > >
>> >>>> > > > *Regards*
>> >>>> > > > Prabu.N
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
>> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
>> >>>> > > wrote:
>> >>>> > > >
>> >>>> > > >> So for dynamic queue i have to use only recipientlist
>> correct,we
>> >>>> can't
>> >>>> > > use
>> >>>> > > >> .to
>> >>>> > > >>
>> >>>> > > >> One more question,i can't use otherwise in choice please
>> correct
>> >>>> if my
>> >>>> > > >> syntax is wrong.
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >> from(INBOUND_QUEUE)
>> >>>> > > >> .choice().when(header(TYPE).isNotNull())
>> >>>> > > >>
>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> >>>> > > >> .otherwise()
>> >>>> > > >>    .to(ERQ_QNAME)
>> >>>> > > >> .endChoice();
>> >>>> > > >>
>> >>>> > > >> After execute i am getting following error.
>> >>>> > > >>
>> >>>> > > >> Error:
>> >>>> > > >>
>> >>>> > > >> Router.java:22: cannot find symbol
>> >>>> > > >> symbol  : method otherwise()
>> >>>> > > >> location: class
>> >>>> > > >>
>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> >>>> > > >> model.ChoiceDefinition>
>> >>>> > > >>            .otherwise()
>> >>>> > > >>            ^
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
>> >>>> > > >> [hidden email] <
>> >>>> http://user/SendEmail.jtp?type=node&node=5731013&i=3
>> >>>>
>> >>>> > >>
>> >>>> > > wrote:
>> >>>> > > >>
>> >>>> > > >>> Hi
>> >>>> > > >>>
>> >>>> > > >>> Yes recipient list uses an expression for evaluating where
>> to
>> >>>> send
>> >>>> > the
>> >>>> > > >>> message to.
>> >>>> > > >>> See its doc
>> >>>> > > >>> http://camel.apache.org/recipient-list.html
>> >>>> > > >>>
>> >>>> > > >>> And this FAQ
>> >>>> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> >>>> > > >>>
>> >>>> > > >>> And there is no performance overhead. eg when you send the
>> >>>> message to
>> >>>> > > >>> a previous destination, then that endpoints/producer is
>> reused.
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
>> >>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
>> >>>> > > >>> <[hidden email] <
>> >>>> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>> >>>> > >
>> >>>> > > >>> wrote:
>> >>>> > > >>>
>> >>>> > > >>> > Question:1
>> >>>> > > >>> >
>> >>>> > > >>> > I am having code like blow.based on condition i want
>> forward
>> >>>> into
>> >>>> > > >>> dynamic
>> >>>> > > >>> > queue.
>> >>>> > > >>> >
>> >>>> > > >>> >  .when(header(TYPE).isNotNull())
>> >>>> > > >>> >
>> >>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> >>>> > > >>> >
>> >>>> > > >>> > i want to use .to(simple ) insight of
>> .recipientList(simple)
>> >>>> > > >>> >
>> >>>> > > >>> > Please suggest is it possible?.why it is not possible is
>> there
>> >>>> any
>> >>>> > > >>> > performance issue if i use .recipientList(simple)
>> >>>> > > >>> >
>> >>>> > > >>> > Questuon:2
>> >>>> > > >>> >
>> >>>> > > >>> > Error in code
>> >>>> > > >>> >
>> >>>> > > >>> > from(INBOUND_QUEUE)
>> >>>> > > >>> > .choice().when(header(TYPE).isNotNull())
>> >>>> > > >>> >
>> >>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> >>>> > > >>> > .otherwise()
>> >>>> > > >>> >    .to(ERQ_QNAME)
>> >>>> > > >>> > .endChoice();
>> >>>> > > >>> >
>> >>>> > > >>> > After execute i am getting following error.
>> >>>> > > >>> >
>> >>>> > > >>> > Error:
>> >>>> > > >>> >
>> >>>> > > >>> > Router.java:22: cannot find symbol
>> >>>> > > >>> > symbol  : method otherwise()
>> >>>> > > >>> > location: class
>> >>>> > > >>> >
>> >>>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> >>>> > > >>> > model.ChoiceDefinition>
>> >>>> > > >>> >            .otherwise()
>> >>>> > > >>> >            ^
>> >>>> > > >>> >
>> >>>> > > >>> > Question:3
>> >>>> > > >>> >
>> >>>> > > >>> > I having more than 85 queues.Based on condition i want to
>> >>>> forward
>> >>>> > to
>> >>>> > > >>> correct
>> >>>> > > >>> > queue.
>> >>>> > > >>> >
>> >>>> > > >>> > In my route builder i having code below for all 85 queus.
>> >>>> > > >>> >
>> >>>> > > >>> >   from(ALERT_QNAME).choice()
>> >>>> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>> >>>> > > >>> >           .otherwise()
>> >>>> > > >>> >           .to(ERQ_QNAME)
>> >>>> > > >>> >  .end();
>> >>>> > > >>> >
>> >>>> > > >>> > I feel like because of my code performance getting
>> >>>> degrade.Please
>> >>>> > > >>> suggest if
>> >>>> > > >>> > i am wrong?
>> >>>> > > >>> >
>> >>>> > > >>> > When i open jconsole i am getting white screen and queues
>> some
>> >>>> time
>> >>>> > > not
>> >>>> > > >>> > showing any attribute?
>> >>>> > > >>> >
>> >>>> > > >>> > Please kindly help me.
>> >>>> > > >>> >
>> >>>> > > >>> >
>> >>>> > > >>> >
>> >>>> > > >>> > --
>> >>>> > > >>> > View this message in context:
>> >>>> > > >>>
>> >>>> > >
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>> >>>> > > >>>
>> >>>> > > >>> > Sent from the Camel - Users mailing list archive at
>> >>>> Nabble.com.
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>> --
>> >>>> > > >>> Claus Ibsen
>> >>>> > > >>> -----------------
>> >>>> > > >>> Red Hat, Inc.
>> >>>> > > >>> FuseSource is now part of Red Hat
>> >>>> > > >>> Email: [hidden email]<
>> >>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
>> >>>> > > >>> Web: http://fusesource.com
>> >>>> > > >>> Twitter: davsclaus
>> >>>> > > >>> Blog: http://davsclaus.com
>> >>>> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>> ------------------------------
>> >>>> > > >>>  If you reply to this email, your message will be added to
>> the
>> >>>> > > >>> discussion below:
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > >
>> >>>> > > >>> .
>> >>>> > > >>> 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
>> >>>> > >
>> >>>> > >
>> >>>> > > >>>
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >> --
>> >>>> > > >> Thanks & Regards
>> >>>> > > >>  Prabu.N
>> >>>> > > >>
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > > --
>> >>>> > > > Thanks & Regards
>> >>>> > > >  Prabu.N
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > > --
>> >>>> > > > View this message in context:
>> >>>> > >
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
>> >>>> > >
>> >>>> > > > Sent from the Camel - Users mailing list archive at
>> Nabble.com.
>> >>>> > >
>> >>>> > >
>> >>>> > >
>> >>>> > > --
>> >>>> > > Claus Ibsen
>> >>>> > > -----------------
>> >>>> > > Red Hat, Inc.
>> >>>> > > FuseSource is now part of Red Hat
>> >>>> > > Email: [hidden email]<
>> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
>> >>>> > > Web: http://fusesource.com
>> >>>> > > Twitter: davsclaus
>> >>>> > > Blog: http://davsclaus.com
>> >>>> > > Author of Camel in Action: http://www.manning.com/ibsen
>> >>>> > >
>> >>>> > >
>> >>>> > > ------------------------------
>> >>>> > >  If you reply to this email, your message will be added to the
>> >>>> discussion
>> >>>> > > below:
>> >>>> > >
>> >>>> > >
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
>> >>>> > >  To unsubscribe from Camel routing issue, 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
>> >>>> > >
>> >>>> > >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > --
>> >>>> > Thanks & Regards
>> >>>> >  Prabu.N
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > --
>> >>>> > View this message in context:
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
>> >>>>
>> >>>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>>> >
>> >>>>
>> >>>>
>> >>>> ------------------------------
>> >>>>  If you reply to this email, your message will be added to the
>> >>>> discussion below:
>> >>>>
>> >>>>
>>
>> >>>> .
>> >>>> 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>
>>
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Thanks & Regards
>> >>>  Prabu.N
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Thanks & Regards
>> >>  Prabu.N
>> >>
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> >  Prabu.N
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736112.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=5>
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736125.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736141.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
if you don't mind can you provide sample how to use this property to set
jmsExpiration time for messages


*Thanks*
Prabu.N


On Tue, Jul 23, 2013 at 6:48 PM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5736125h77@n5.nabble.com> wrote:

> Hi
>
> Have you read about the preserveMessageQos option?
> http://camel.apache.org/jms
>
>
> On Tue, Jul 23, 2013 at 1:39 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5736125&i=1>>
> wrote:
>
> > Hi
> >
> > I need one help,I want set JMSExpiration value before routing messages.
> >
> > i tried setting JMSExpiration in .setHeader
> >
> > But it didn't work.I still seeing JMSExpiration is zero.
> >
> > *Thanks*
> > Prabu.N
> >
> >
> > On Wed, Apr 24, 2013 at 9:28 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=2>>
> wrote:
> >
> >> Please kindly help me.
> >>
> >>
> >> Regards
> >> Prabu.N
> >>
> >>
> >> On Wed, Apr 24, 2013 at 2:54 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=3>>
> wrote:
> >>
> >>> Hi All,
> >>>
> >>> I am facing some issue in my camel code.
> >>>
> >>> Initially i have used java code to route messages from one end to
> another
> >>> end.
> >>>
> >>> I modified code to route message using camel routing insight of java
> code.
> >>>
> >>> After modified code,i am facing issue in my code.
> >>>
> >>> 500 Messages stored in DLQ.testQueue
> >>>
> >>> When i try to re-delivery all 500 messages using active-mq API
> *moveMessageTo
> >>> method.*
> >>>
> >>> 250 or 200 or 100 messages still i can see in DLQ.testQueue.
> >>>
> >>> I feel messages re-delivering,But due to some message coming back
> again
> >>> into DLQ.
> >>>
> >>> Please kindly help me.
> >>>
> >>> *Regards*
> >>> Prabu.N
> >>>
> >>>
> >>> On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
> >>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5736125&i=4>>
> wrote:
> >>>
> >>>> Hi
> >>>>
> >>>> Looks like java needs a hand[1], after
> >>>> .to(SCHEDULE_QNAME,ONLINE__QNAME),
> >>>> you can try endChoice()
> >>>>
> >>>> [1]
> >>>>
> >>>>
> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
> >>>>
> >>>> Taariq
> >>>>
> >>>>
> >>>> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
> >>>> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
> >>>> > wrote:
> >>>>
> >>>> > Thanks Claus for your response..
> >>>> >
> >>>> > I facing some issue in below code
> >>>> >
> >>>> > if condition satisfy i want forward into 2 queues,If not it check
> >>>> second
> >>>> > condition forward into next queue.
> >>>> >
> >>>> >     from(SURVEYINVITATION_QNAME).choice()
> >>>> > *          .when(SCHEDULE_PREDICATE)*
> >>>> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
> >>>> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
> >>>> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
> >>>> >           .otherwise()
> >>>> >               .to(ERQ_QNAME)
> >>>> >          .end();
> >>>> >
> >>>> >
> >>>> > I am getting compilation error,Please correct me what mistake i am
> >>>> making
> >>>> > here
> >>>> >
> >>>> > *Regards*
> >>>> > Prabu.N
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
> >>>> > [hidden email] <
> http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
> >>>> wrote:
> >>>> >
> >>>> > > Hi
> >>>> > >
> >>>> > > If no destinations is returned, then the message is not routed
> >>>> anywhere.
> >>>> > >
> >>>> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
> >>>> > > <[hidden email] <
> >>>> http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
> >>>> > > wrote:
> >>>> > >
> >>>> > > > *One quick question.*
> >>>> > > >
> >>>> > > >
> >>>> > >
> >>>> >
> >>>>
> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>
> >>>>
> >>>> > >
> >>>> > > >
> >>>> > > > @RecipientList()
> >>>> > > >  public Set<String> routeTo(Exchange ex) {
> >>>> > > >
> >>>> > > >  final Set<String> destinations = new HashSet<String>();
> >>>> > > >
> >>>> > > >  //based on condition we add messages header/content ,We add
> queue
> >>>> > names
> >>>> > > in
> >>>> > > > destinations varible.
> >>>> > > >  //destinations.add("activemq:queue:listqueue")
> >>>> > > >
> >>>> > > >   return destinations;
> >>>> > > >  }
> >>>> > > >
> >>>> > > > some cases,messages content not satisfy any condition and it
> >>>> returning
> >>>> > > > empty destinations set.
> >>>> > > >
> >>>> > > > If destinations set is empty where message will go?.
> >>>> > > >
> >>>> > > > Because,i can't see messages in HHH.InboundQueue and any
> queues.
> >>>> > > >
> >>>> > > > *Regards*
> >>>> > > > Prabu.N
> >>>> > > >
> >>>> > > >
> >>>> > > >
> >>>> > > >
> >>>> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
> >>>> > > wrote:
> >>>> > > >
> >>>> > > >> So for dynamic queue i have to use only recipientlist
> correct,we
> >>>> can't
> >>>> > > use
> >>>> > > >> .to
> >>>> > > >>
> >>>> > > >> One more question,i can't use otherwise in choice please
> correct
> >>>> if my
> >>>> > > >> syntax is wrong.
> >>>> > > >>
> >>>> > > >>
> >>>> > > >> from(INBOUND_QUEUE)
> >>>> > > >> .choice().when(header(TYPE).isNotNull())
> >>>> > > >>
> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> >>>> > > >> .otherwise()
> >>>> > > >>    .to(ERQ_QNAME)
> >>>> > > >> .endChoice();
> >>>> > > >>
> >>>> > > >> After execute i am getting following error.
> >>>> > > >>
> >>>> > > >> Error:
> >>>> > > >>
> >>>> > > >> Router.java:22: cannot find symbol
> >>>> > > >> symbol  : method otherwise()
> >>>> > > >> location: class
> >>>> > > >>
> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> >>>> > > >> model.ChoiceDefinition>
> >>>> > > >>            .otherwise()
> >>>> > > >>            ^
> >>>> > > >>
> >>>> > > >>
> >>>> > > >>
> >>>> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
> >>>> > > >> [hidden email] <
> >>>> http://user/SendEmail.jtp?type=node&node=5731013&i=3
> >>>>
> >>>> > >>
> >>>> > > wrote:
> >>>> > > >>
> >>>> > > >>> Hi
> >>>> > > >>>
> >>>> > > >>> Yes recipient list uses an expression for evaluating where to
> >>>> send
> >>>> > the
> >>>> > > >>> message to.
> >>>> > > >>> See its doc
> >>>> > > >>> http://camel.apache.org/recipient-list.html
> >>>> > > >>>
> >>>> > > >>> And this FAQ
> >>>> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> >>>> > > >>>
> >>>> > > >>> And there is no performance overhead. eg when you send the
> >>>> message to
> >>>> > > >>> a previous destination, then that endpoints/producer is
> reused.
> >>>> > > >>>
> >>>> > > >>>
> >>>> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
> >>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
> >>>> > > >>> <[hidden email] <
> >>>> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
> >>>> > >
> >>>> > > >>> wrote:
> >>>> > > >>>
> >>>> > > >>> > Question:1
> >>>> > > >>> >
> >>>> > > >>> > I am having code like blow.based on condition i want
> forward
> >>>> into
> >>>> > > >>> dynamic
> >>>> > > >>> > queue.
> >>>> > > >>> >
> >>>> > > >>> >  .when(header(TYPE).isNotNull())
> >>>> > > >>> >
> >>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> >>>> > > >>> >
> >>>> > > >>> > i want to use .to(simple ) insight of
> .recipientList(simple)
> >>>> > > >>> >
> >>>> > > >>> > Please suggest is it possible?.why it is not possible is
> there
> >>>> any
> >>>> > > >>> > performance issue if i use .recipientList(simple)
> >>>> > > >>> >
> >>>> > > >>> > Questuon:2
> >>>> > > >>> >
> >>>> > > >>> > Error in code
> >>>> > > >>> >
> >>>> > > >>> > from(INBOUND_QUEUE)
> >>>> > > >>> > .choice().when(header(TYPE).isNotNull())
> >>>> > > >>> >
> >>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> >>>> > > >>> > .otherwise()
> >>>> > > >>> >    .to(ERQ_QNAME)
> >>>> > > >>> > .endChoice();
> >>>> > > >>> >
> >>>> > > >>> > After execute i am getting following error.
> >>>> > > >>> >
> >>>> > > >>> > Error:
> >>>> > > >>> >
> >>>> > > >>> > Router.java:22: cannot find symbol
> >>>> > > >>> > symbol  : method otherwise()
> >>>> > > >>> > location: class
> >>>> > > >>> >
> >>>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> >>>> > > >>> > model.ChoiceDefinition>
> >>>> > > >>> >            .otherwise()
> >>>> > > >>> >            ^
> >>>> > > >>> >
> >>>> > > >>> > Question:3
> >>>> > > >>> >
> >>>> > > >>> > I having more than 85 queues.Based on condition i want to
> >>>> forward
> >>>> > to
> >>>> > > >>> correct
> >>>> > > >>> > queue.
> >>>> > > >>> >
> >>>> > > >>> > In my route builder i having code below for all 85 queus.
> >>>> > > >>> >
> >>>> > > >>> >   from(ALERT_QNAME).choice()
> >>>> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
> >>>> > > >>> >           .otherwise()
> >>>> > > >>> >           .to(ERQ_QNAME)
> >>>> > > >>> >  .end();
> >>>> > > >>> >
> >>>> > > >>> > I feel like because of my code performance getting
> >>>> degrade.Please
> >>>> > > >>> suggest if
> >>>> > > >>> > i am wrong?
> >>>> > > >>> >
> >>>> > > >>> > When i open jconsole i am getting white screen and queues
> some
> >>>> time
> >>>> > > not
> >>>> > > >>> > showing any attribute?
> >>>> > > >>> >
> >>>> > > >>> > Please kindly help me.
> >>>> > > >>> >
> >>>> > > >>> >
> >>>> > > >>> >
> >>>> > > >>> > --
> >>>> > > >>> > View this message in context:
> >>>> > > >>>
> >>>> > >
> >>>> >
> >>>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
> >>>> > > >>>
> >>>> > > >>> > Sent from the Camel - Users mailing list archive at
> >>>> Nabble.com.
> >>>> > > >>>
> >>>> > > >>>
> >>>> > > >>>
> >>>> > > >>> --
> >>>> > > >>> Claus Ibsen
> >>>> > > >>> -----------------
> >>>> > > >>> Red Hat, Inc.
> >>>> > > >>> FuseSource is now part of Red Hat
> >>>> > > >>> Email: [hidden email]<
> >>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
> >>>> > > >>> Web: http://fusesource.com
> >>>> > > >>> Twitter: davsclaus
> >>>> > > >>> Blog: http://davsclaus.com
> >>>> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
> >>>> > > >>>
> >>>> > > >>>
> >>>> > > >>> ------------------------------
> >>>> > > >>>  If you reply to this email, your message will be added to
> the
> >>>> > > >>> discussion below:
> >>>> > > >>>
> >>>> > > >>>
> >>>> > >
> >>>> > > >>> .
> >>>> > > >>> 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
> >>>> > >
> >>>> > >
> >>>> > > >>>
> >>>> > > >>
> >>>> > > >>
> >>>> > > >>
> >>>> > > >> --
> >>>> > > >> Thanks & Regards
> >>>> > > >>  Prabu.N
> >>>> > > >>
> >>>> > > >
> >>>> > > >
> >>>> > > >
> >>>> > > > --
> >>>> > > > Thanks & Regards
> >>>> > > >  Prabu.N
> >>>> > > >
> >>>> > > >
> >>>> > > >
> >>>> > > >
> >>>> > > > --
> >>>> > > > View this message in context:
> >>>> > >
> >>>> >
> >>>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
> >>>> > >
> >>>> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >>>> > >
> >>>> > >
> >>>> > >
> >>>> > > --
> >>>> > > Claus Ibsen
> >>>> > > -----------------
> >>>> > > Red Hat, Inc.
> >>>> > > FuseSource is now part of Red Hat
> >>>> > > Email: [hidden email]<
> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
> >>>> > > Web: http://fusesource.com
> >>>> > > Twitter: davsclaus
> >>>> > > Blog: http://davsclaus.com
> >>>> > > Author of Camel in Action: http://www.manning.com/ibsen
> >>>> > >
> >>>> > >
> >>>> > > ------------------------------
> >>>> > >  If you reply to this email, your message will be added to the
> >>>> discussion
> >>>> > > below:
> >>>> > >
> >>>> > >
> >>>> >
> >>>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
> >>>> > >  To unsubscribe from Camel routing issue, 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
> >>>> > >
> >>>> > >
> >>>> >
> >>>> >
> >>>> >
> >>>> > --
> >>>> > Thanks & Regards
> >>>> >  Prabu.N
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> > --
> >>>> > View this message in context:
> >>>> >
> >>>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
> >>>>
> >>>> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >>>> >
> >>>>
> >>>>
> >>>> ------------------------------
> >>>>  If you reply to this email, your message will be added to the
> >>>> discussion below:
> >>>>
> >>>>
>
> >>>> .
> >>>> 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>
>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Thanks & Regards
> >>>  Prabu.N
> >>>
> >>
> >>
> >>
> >> --
> >> Thanks & Regards
> >>  Prabu.N
> >>
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736112.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=5>
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736125.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736128.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Please kindly provide some sample code.

*Thanks*
Prabu.N


On Tue, Jul 23, 2013 at 7:04 PM, Prabu <pr...@gmail.com> wrote:

> if you don't mind can you provide sample how to use this property to set
> jmsExpiration time for messages
>
>
> *Thanks*
> Prabu.N
>
>
> On Tue, Jul 23, 2013 at 6:48 PM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5736125h77@n5.nabble.com> wrote:
>
>> Hi
>>
>> Have you read about the preserveMessageQos option?
>> http://camel.apache.org/jms
>>
>>
>> On Tue, Jul 23, 2013 at 1:39 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=0>
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5736125&i=1>>
>> wrote:
>>
>> > Hi
>> >
>> > I need one help,I want set JMSExpiration value before routing messages.
>> >
>> > i tried setting JMSExpiration in .setHeader
>> >
>> > But it didn't work.I still seeing JMSExpiration is zero.
>> >
>> > *Thanks*
>> > Prabu.N
>> >
>> >
>> > On Wed, Apr 24, 2013 at 9:28 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=2>>
>> wrote:
>> >
>> >> Please kindly help me.
>> >>
>> >>
>> >> Regards
>> >> Prabu.N
>> >>
>> >>
>> >> On Wed, Apr 24, 2013 at 2:54 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=3>>
>> wrote:
>> >>
>> >>> Hi All,
>> >>>
>> >>> I am facing some issue in my camel code.
>> >>>
>> >>> Initially i have used java code to route messages from one end to
>> another
>> >>> end.
>> >>>
>> >>> I modified code to route message using camel routing insight of java
>> code.
>> >>>
>> >>> After modified code,i am facing issue in my code.
>> >>>
>> >>> 500 Messages stored in DLQ.testQueue
>> >>>
>> >>> When i try to re-delivery all 500 messages using active-mq API
>> *moveMessageTo
>> >>> method.*
>> >>>
>> >>> 250 or 200 or 100 messages still i can see in DLQ.testQueue.
>> >>>
>> >>> I feel messages re-delivering,But due to some message coming back
>> again
>> >>> into DLQ.
>> >>>
>> >>> Please kindly help me.
>> >>>
>> >>> *Regards*
>> >>> Prabu.N
>> >>>
>> >>>
>> >>> On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
>> >>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5736125&i=4>>
>> wrote:
>> >>>
>> >>>> Hi
>> >>>>
>> >>>> Looks like java needs a hand[1], after
>> >>>> .to(SCHEDULE_QNAME,ONLINE__QNAME),
>> >>>> you can try endChoice()
>> >>>>
>> >>>> [1]
>> >>>>
>> >>>>
>> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
>> >>>>
>> >>>> Taariq
>> >>>>
>> >>>>
>> >>>> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<
>> http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
>> >>>> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
>> >>>> > wrote:
>> >>>>
>> >>>> > Thanks Claus for your response..
>> >>>> >
>> >>>> > I facing some issue in below code
>> >>>> >
>> >>>> > if condition satisfy i want forward into 2 queues,If not it check
>> >>>> second
>> >>>> > condition forward into next queue.
>> >>>> >
>> >>>> >     from(SURVEYINVITATION_QNAME).choice()
>> >>>> > *          .when(SCHEDULE_PREDICATE)*
>> >>>> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
>> >>>> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
>> >>>> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
>> >>>> >           .otherwise()
>> >>>> >               .to(ERQ_QNAME)
>> >>>> >          .end();
>> >>>> >
>> >>>> >
>> >>>> > I am getting compilation error,Please correct me what mistake i am
>> >>>> making
>> >>>> > here
>> >>>> >
>> >>>> > *Regards*
>> >>>> > Prabu.N
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
>> >>>> > [hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
>> >>>> wrote:
>> >>>> >
>> >>>> > > Hi
>> >>>> > >
>> >>>> > > If no destinations is returned, then the message is not routed
>> >>>> anywhere.
>> >>>> > >
>> >>>> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
>> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
>> >>>> > > <[hidden email] <
>> >>>> http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
>> >>>> > > wrote:
>> >>>> > >
>> >>>> > > > *One quick question.*
>> >>>> > > >
>> >>>> > > >
>> >>>> > >
>> >>>> >
>> >>>>
>> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>>
>> >>>>
>> >>>> > >
>> >>>> > > >
>> >>>> > > > @RecipientList()
>> >>>> > > >  public Set<String> routeTo(Exchange ex) {
>> >>>> > > >
>> >>>> > > >  final Set<String> destinations = new HashSet<String>();
>> >>>> > > >
>> >>>> > > >  //based on condition we add messages header/content ,We add
>> queue
>> >>>> > names
>> >>>> > > in
>> >>>> > > > destinations varible.
>> >>>> > > >  //destinations.add("activemq:queue:listqueue")
>> >>>> > > >
>> >>>> > > >   return destinations;
>> >>>> > > >  }
>> >>>> > > >
>> >>>> > > > some cases,messages content not satisfy any condition and it
>> >>>> returning
>> >>>> > > > empty destinations set.
>> >>>> > > >
>> >>>> > > > If destinations set is empty where message will go?.
>> >>>> > > >
>> >>>> > > > Because,i can't see messages in HHH.InboundQueue and any
>> queues.
>> >>>> > > >
>> >>>> > > > *Regards*
>> >>>> > > > Prabu.N
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
>> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
>> >>>> > > wrote:
>> >>>> > > >
>> >>>> > > >> So for dynamic queue i have to use only recipientlist
>> correct,we
>> >>>> can't
>> >>>> > > use
>> >>>> > > >> .to
>> >>>> > > >>
>> >>>> > > >> One more question,i can't use otherwise in choice please
>> correct
>> >>>> if my
>> >>>> > > >> syntax is wrong.
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >> from(INBOUND_QUEUE)
>> >>>> > > >> .choice().when(header(TYPE).isNotNull())
>> >>>> > > >>
>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> >>>> > > >> .otherwise()
>> >>>> > > >>    .to(ERQ_QNAME)
>> >>>> > > >> .endChoice();
>> >>>> > > >>
>> >>>> > > >> After execute i am getting following error.
>> >>>> > > >>
>> >>>> > > >> Error:
>> >>>> > > >>
>> >>>> > > >> Router.java:22: cannot find symbol
>> >>>> > > >> symbol  : method otherwise()
>> >>>> > > >> location: class
>> >>>> > > >>
>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> >>>> > > >> model.ChoiceDefinition>
>> >>>> > > >>            .otherwise()
>> >>>> > > >>            ^
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
>> >>>> > > >> [hidden email] <
>> >>>> http://user/SendEmail.jtp?type=node&node=5731013&i=3
>> >>>>
>> >>>> > >>
>> >>>> > > wrote:
>> >>>> > > >>
>> >>>> > > >>> Hi
>> >>>> > > >>>
>> >>>> > > >>> Yes recipient list uses an expression for evaluating where
>> to
>> >>>> send
>> >>>> > the
>> >>>> > > >>> message to.
>> >>>> > > >>> See its doc
>> >>>> > > >>> http://camel.apache.org/recipient-list.html
>> >>>> > > >>>
>> >>>> > > >>> And this FAQ
>> >>>> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> >>>> > > >>>
>> >>>> > > >>> And there is no performance overhead. eg when you send the
>> >>>> message to
>> >>>> > > >>> a previous destination, then that endpoints/producer is
>> reused.
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
>> >>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
>> >>>> > > >>> <[hidden email] <
>> >>>> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>> >>>> > >
>> >>>> > > >>> wrote:
>> >>>> > > >>>
>> >>>> > > >>> > Question:1
>> >>>> > > >>> >
>> >>>> > > >>> > I am having code like blow.based on condition i want
>> forward
>> >>>> into
>> >>>> > > >>> dynamic
>> >>>> > > >>> > queue.
>> >>>> > > >>> >
>> >>>> > > >>> >  .when(header(TYPE).isNotNull())
>> >>>> > > >>> >
>> >>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> >>>> > > >>> >
>> >>>> > > >>> > i want to use .to(simple ) insight of
>> .recipientList(simple)
>> >>>> > > >>> >
>> >>>> > > >>> > Please suggest is it possible?.why it is not possible is
>> there
>> >>>> any
>> >>>> > > >>> > performance issue if i use .recipientList(simple)
>> >>>> > > >>> >
>> >>>> > > >>> > Questuon:2
>> >>>> > > >>> >
>> >>>> > > >>> > Error in code
>> >>>> > > >>> >
>> >>>> > > >>> > from(INBOUND_QUEUE)
>> >>>> > > >>> > .choice().when(header(TYPE).isNotNull())
>> >>>> > > >>> >
>> >>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> >>>> > > >>> > .otherwise()
>> >>>> > > >>> >    .to(ERQ_QNAME)
>> >>>> > > >>> > .endChoice();
>> >>>> > > >>> >
>> >>>> > > >>> > After execute i am getting following error.
>> >>>> > > >>> >
>> >>>> > > >>> > Error:
>> >>>> > > >>> >
>> >>>> > > >>> > Router.java:22: cannot find symbol
>> >>>> > > >>> > symbol  : method otherwise()
>> >>>> > > >>> > location: class
>> >>>> > > >>> >
>> >>>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> >>>> > > >>> > model.ChoiceDefinition>
>> >>>> > > >>> >            .otherwise()
>> >>>> > > >>> >            ^
>> >>>> > > >>> >
>> >>>> > > >>> > Question:3
>> >>>> > > >>> >
>> >>>> > > >>> > I having more than 85 queues.Based on condition i want to
>> >>>> forward
>> >>>> > to
>> >>>> > > >>> correct
>> >>>> > > >>> > queue.
>> >>>> > > >>> >
>> >>>> > > >>> > In my route builder i having code below for all 85 queus.
>> >>>> > > >>> >
>> >>>> > > >>> >   from(ALERT_QNAME).choice()
>> >>>> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>> >>>> > > >>> >           .otherwise()
>> >>>> > > >>> >           .to(ERQ_QNAME)
>> >>>> > > >>> >  .end();
>> >>>> > > >>> >
>> >>>> > > >>> > I feel like because of my code performance getting
>> >>>> degrade.Please
>> >>>> > > >>> suggest if
>> >>>> > > >>> > i am wrong?
>> >>>> > > >>> >
>> >>>> > > >>> > When i open jconsole i am getting white screen and queues
>> some
>> >>>> time
>> >>>> > > not
>> >>>> > > >>> > showing any attribute?
>> >>>> > > >>> >
>> >>>> > > >>> > Please kindly help me.
>> >>>> > > >>> >
>> >>>> > > >>> >
>> >>>> > > >>> >
>> >>>> > > >>> > --
>> >>>> > > >>> > View this message in context:
>> >>>> > > >>>
>> >>>> > >
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>> >>>> > > >>>
>> >>>> > > >>> > Sent from the Camel - Users mailing list archive at
>> >>>> Nabble.com.
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>> --
>> >>>> > > >>> Claus Ibsen
>> >>>> > > >>> -----------------
>> >>>> > > >>> Red Hat, Inc.
>> >>>> > > >>> FuseSource is now part of Red Hat
>> >>>> > > >>> Email: [hidden email]<
>> >>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
>> >>>> > > >>> Web: http://fusesource.com
>> >>>> > > >>> Twitter: davsclaus
>> >>>> > > >>> Blog: http://davsclaus.com
>> >>>> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > > >>> ------------------------------
>> >>>> > > >>>  If you reply to this email, your message will be added to
>> the
>> >>>> > > >>> discussion below:
>> >>>> > > >>>
>> >>>> > > >>>
>> >>>> > >
>> >>>> > > >>> .
>> >>>> > > >>> 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
>> >>>> > >
>> >>>> > >
>> >>>> > > >>>
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >>
>> >>>> > > >> --
>> >>>> > > >> Thanks & Regards
>> >>>> > > >>  Prabu.N
>> >>>> > > >>
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > > --
>> >>>> > > > Thanks & Regards
>> >>>> > > >  Prabu.N
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > >
>> >>>> > > > --
>> >>>> > > > View this message in context:
>> >>>> > >
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
>> >>>> > >
>> >>>> > > > Sent from the Camel - Users mailing list archive at
>> Nabble.com.
>> >>>> > >
>> >>>> > >
>> >>>> > >
>> >>>> > > --
>> >>>> > > Claus Ibsen
>> >>>> > > -----------------
>> >>>> > > Red Hat, Inc.
>> >>>> > > FuseSource is now part of Red Hat
>> >>>> > > Email: [hidden email]<
>> >>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
>> >>>> > > Web: http://fusesource.com
>> >>>> > > Twitter: davsclaus
>> >>>> > > Blog: http://davsclaus.com
>> >>>> > > Author of Camel in Action: http://www.manning.com/ibsen
>> >>>> > >
>> >>>> > >
>> >>>> > > ------------------------------
>> >>>> > >  If you reply to this email, your message will be added to the
>> >>>> discussion
>> >>>> > > below:
>> >>>> > >
>> >>>> > >
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
>> >>>> > >  To unsubscribe from Camel routing issue, 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
>> >>>> > >
>> >>>> > >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > --
>> >>>> > Thanks & Regards
>> >>>> >  Prabu.N
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > --
>> >>>> > View this message in context:
>> >>>> >
>> >>>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
>> >>>>
>> >>>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>>> >
>> >>>>
>> >>>>
>> >>>> ------------------------------
>> >>>>  If you reply to this email, your message will be added to the
>> >>>> discussion below:
>> >>>>
>> >>>>
>>
>> >>>> .
>> >>>> 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>
>>
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Thanks & Regards
>> >>>  Prabu.N
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Thanks & Regards
>> >>  Prabu.N
>> >>
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> >  Prabu.N
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736112.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5736125&i=5>
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736125.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736139.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

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

Have you read about the preserveMessageQos option?
http://camel.apache.org/jms

On Tue, Jul 23, 2013 at 1:39 PM, prabumca06@gmail.com
<pr...@gmail.com> wrote:
> Hi
>
> I need one help,I want set JMSExpiration value before routing messages.
>
> i tried setting JMSExpiration in .setHeader
>
> But it didn't work.I still seeing JMSExpiration is zero.
>
> *Thanks*
> Prabu.N
>
>
> On Wed, Apr 24, 2013 at 9:28 PM, Prabu <pr...@gmail.com> wrote:
>
>> Please kindly help me.
>>
>>
>> Regards
>> Prabu.N
>>
>>
>> On Wed, Apr 24, 2013 at 2:54 PM, Prabu <pr...@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> I am facing some issue in my camel code.
>>>
>>> Initially i have used java code to route messages from one end to another
>>> end.
>>>
>>> I modified code to route message using camel routing insight of java code.
>>>
>>> After modified code,i am facing issue in my code.
>>>
>>> 500 Messages stored in DLQ.testQueue
>>>
>>> When i try to re-delivery all 500 messages using active-mq API *moveMessageTo
>>> method.*
>>>
>>> 250 or 200 or 100 messages still i can see in DLQ.testQueue.
>>>
>>> I feel messages re-delivering,But due to some message coming back again
>>> into DLQ.
>>>
>>> Please kindly help me.
>>>
>>> *Regards*
>>> Prabu.N
>>>
>>>
>>> On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
>>> ml-node+s465427n5731018h60@n5.nabble.com> wrote:
>>>
>>>> Hi
>>>>
>>>> Looks like java needs a hand[1], after
>>>> .to(SCHEDULE_QNAME,ONLINE__QNAME),
>>>> you can try endChoice()
>>>>
>>>> [1]
>>>>
>>>> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
>>>>
>>>> Taariq
>>>>
>>>>
>>>> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
>>>> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
>>>> > wrote:
>>>>
>>>> > Thanks Claus for your response..
>>>> >
>>>> > I facing some issue in below code
>>>> >
>>>> > if condition satisfy i want forward into 2 queues,If not it check
>>>> second
>>>> > condition forward into next queue.
>>>> >
>>>> >     from(SURVEYINVITATION_QNAME).choice()
>>>> > *          .when(SCHEDULE_PREDICATE)*
>>>> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
>>>> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
>>>> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
>>>> >           .otherwise()
>>>> >               .to(ERQ_QNAME)
>>>> >          .end();
>>>> >
>>>> >
>>>> > I am getting compilation error,Please correct me what mistake i am
>>>> making
>>>> > here
>>>> >
>>>> > *Regards*
>>>> > Prabu.N
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
>>>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
>>>> wrote:
>>>> >
>>>> > > Hi
>>>> > >
>>>> > > If no destinations is returned, then the message is not routed
>>>> anywhere.
>>>> > >
>>>> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
>>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
>>>> > > <[hidden email] <
>>>> http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
>>>> > > wrote:
>>>> > >
>>>> > > > *One quick question.*
>>>> > > >
>>>> > > >
>>>> > >
>>>> >
>>>> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>>>>
>>>> > >
>>>> > > >
>>>> > > > @RecipientList()
>>>> > > >  public Set<String> routeTo(Exchange ex) {
>>>> > > >
>>>> > > >  final Set<String> destinations = new HashSet<String>();
>>>> > > >
>>>> > > >  //based on condition we add messages header/content ,We add queue
>>>> > names
>>>> > > in
>>>> > > > destinations varible.
>>>> > > >  //destinations.add("activemq:queue:listqueue")
>>>> > > >
>>>> > > >   return destinations;
>>>> > > >  }
>>>> > > >
>>>> > > > some cases,messages content not satisfy any condition and it
>>>> returning
>>>> > > > empty destinations set.
>>>> > > >
>>>> > > > If destinations set is empty where message will go?.
>>>> > > >
>>>> > > > Because,i can't see messages in HHH.InboundQueue and any queues.
>>>> > > >
>>>> > > > *Regards*
>>>> > > > Prabu.N
>>>> > > >
>>>> > > >
>>>> > > >
>>>> > > >
>>>> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
>>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
>>>> > > wrote:
>>>> > > >
>>>> > > >> So for dynamic queue i have to use only recipientlist correct,we
>>>> can't
>>>> > > use
>>>> > > >> .to
>>>> > > >>
>>>> > > >> One more question,i can't use otherwise in choice please correct
>>>> if my
>>>> > > >> syntax is wrong.
>>>> > > >>
>>>> > > >>
>>>> > > >> from(INBOUND_QUEUE)
>>>> > > >> .choice().when(header(TYPE).isNotNull())
>>>> > > >>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>>> > > >> .otherwise()
>>>> > > >>    .to(ERQ_QNAME)
>>>> > > >> .endChoice();
>>>> > > >>
>>>> > > >> After execute i am getting following error.
>>>> > > >>
>>>> > > >> Error:
>>>> > > >>
>>>> > > >> Router.java:22: cannot find symbol
>>>> > > >> symbol  : method otherwise()
>>>> > > >> location: class
>>>> > > >> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>>>> > > >> model.ChoiceDefinition>
>>>> > > >>            .otherwise()
>>>> > > >>            ^
>>>> > > >>
>>>> > > >>
>>>> > > >>
>>>> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
>>>> > > >> [hidden email] <
>>>> http://user/SendEmail.jtp?type=node&node=5731013&i=3
>>>>
>>>> > >>
>>>> > > wrote:
>>>> > > >>
>>>> > > >>> Hi
>>>> > > >>>
>>>> > > >>> Yes recipient list uses an expression for evaluating where to
>>>> send
>>>> > the
>>>> > > >>> message to.
>>>> > > >>> See its doc
>>>> > > >>> http://camel.apache.org/recipient-list.html
>>>> > > >>>
>>>> > > >>> And this FAQ
>>>> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>>>> > > >>>
>>>> > > >>> And there is no performance overhead. eg when you send the
>>>> message to
>>>> > > >>> a previous destination, then that endpoints/producer is reused.
>>>> > > >>>
>>>> > > >>>
>>>> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
>>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
>>>> > > >>> <[hidden email] <
>>>> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>>>> > >
>>>> > > >>> wrote:
>>>> > > >>>
>>>> > > >>> > Question:1
>>>> > > >>> >
>>>> > > >>> > I am having code like blow.based on condition i want forward
>>>> into
>>>> > > >>> dynamic
>>>> > > >>> > queue.
>>>> > > >>> >
>>>> > > >>> >  .when(header(TYPE).isNotNull())
>>>> > > >>> >
>>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>>> > > >>> >
>>>> > > >>> > i want to use .to(simple ) insight of .recipientList(simple)
>>>> > > >>> >
>>>> > > >>> > Please suggest is it possible?.why it is not possible is there
>>>> any
>>>> > > >>> > performance issue if i use .recipientList(simple)
>>>> > > >>> >
>>>> > > >>> > Questuon:2
>>>> > > >>> >
>>>> > > >>> > Error in code
>>>> > > >>> >
>>>> > > >>> > from(INBOUND_QUEUE)
>>>> > > >>> > .choice().when(header(TYPE).isNotNull())
>>>> > > >>> >
>>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>>> > > >>> > .otherwise()
>>>> > > >>> >    .to(ERQ_QNAME)
>>>> > > >>> > .endChoice();
>>>> > > >>> >
>>>> > > >>> > After execute i am getting following error.
>>>> > > >>> >
>>>> > > >>> > Error:
>>>> > > >>> >
>>>> > > >>> > Router.java:22: cannot find symbol
>>>> > > >>> > symbol  : method otherwise()
>>>> > > >>> > location: class
>>>> > > >>> >
>>>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>>>> > > >>> > model.ChoiceDefinition>
>>>> > > >>> >            .otherwise()
>>>> > > >>> >            ^
>>>> > > >>> >
>>>> > > >>> > Question:3
>>>> > > >>> >
>>>> > > >>> > I having more than 85 queues.Based on condition i want to
>>>> forward
>>>> > to
>>>> > > >>> correct
>>>> > > >>> > queue.
>>>> > > >>> >
>>>> > > >>> > In my route builder i having code below for all 85 queus.
>>>> > > >>> >
>>>> > > >>> >   from(ALERT_QNAME).choice()
>>>> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>>>> > > >>> >           .otherwise()
>>>> > > >>> >           .to(ERQ_QNAME)
>>>> > > >>> >  .end();
>>>> > > >>> >
>>>> > > >>> > I feel like because of my code performance getting
>>>> degrade.Please
>>>> > > >>> suggest if
>>>> > > >>> > i am wrong?
>>>> > > >>> >
>>>> > > >>> > When i open jconsole i am getting white screen and queues some
>>>> time
>>>> > > not
>>>> > > >>> > showing any attribute?
>>>> > > >>> >
>>>> > > >>> > Please kindly help me.
>>>> > > >>> >
>>>> > > >>> >
>>>> > > >>> >
>>>> > > >>> > --
>>>> > > >>> > View this message in context:
>>>> > > >>>
>>>> > >
>>>> >
>>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>>>> > > >>>
>>>> > > >>> > Sent from the Camel - Users mailing list archive at
>>>> Nabble.com.
>>>> > > >>>
>>>> > > >>>
>>>> > > >>>
>>>> > > >>> --
>>>> > > >>> Claus Ibsen
>>>> > > >>> -----------------
>>>> > > >>> Red Hat, Inc.
>>>> > > >>> FuseSource is now part of Red Hat
>>>> > > >>> Email: [hidden email]<
>>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
>>>> > > >>> Web: http://fusesource.com
>>>> > > >>> Twitter: davsclaus
>>>> > > >>> Blog: http://davsclaus.com
>>>> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
>>>> > > >>>
>>>> > > >>>
>>>> > > >>> ------------------------------
>>>> > > >>>  If you reply to this email, your message will be added to the
>>>> > > >>> discussion below:
>>>> > > >>>
>>>> > > >>>
>>>> > >
>>>> > > >>> .
>>>> > > >>> 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
>>>> > >
>>>> > >
>>>> > > >>>
>>>> > > >>
>>>> > > >>
>>>> > > >>
>>>> > > >> --
>>>> > > >> Thanks & Regards
>>>> > > >>  Prabu.N
>>>> > > >>
>>>> > > >
>>>> > > >
>>>> > > >
>>>> > > > --
>>>> > > > Thanks & Regards
>>>> > > >  Prabu.N
>>>> > > >
>>>> > > >
>>>> > > >
>>>> > > >
>>>> > > > --
>>>> > > > View this message in context:
>>>> > >
>>>> >
>>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
>>>> > >
>>>> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
>>>> > >
>>>> > >
>>>> > >
>>>> > > --
>>>> > > Claus Ibsen
>>>> > > -----------------
>>>> > > Red Hat, Inc.
>>>> > > FuseSource is now part of Red Hat
>>>> > > Email: [hidden email]<
>>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
>>>> > > Web: http://fusesource.com
>>>> > > Twitter: davsclaus
>>>> > > Blog: http://davsclaus.com
>>>> > > Author of Camel in Action: http://www.manning.com/ibsen
>>>> > >
>>>> > >
>>>> > > ------------------------------
>>>> > >  If you reply to this email, your message will be added to the
>>>> discussion
>>>> > > below:
>>>> > >
>>>> > >
>>>> >
>>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
>>>> > >  To unsubscribe from Camel routing issue, 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
>>>> > >
>>>> > >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Thanks & Regards
>>>> >  Prabu.N
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > View this message in context:
>>>> >
>>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
>>>>
>>>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>>> >
>>>>
>>>>
>>>> ------------------------------
>>>>  If you reply to this email, your message will be added to the
>>>> discussion below:
>>>>
>>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731018.html
>>>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>>>> .
>>>> 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>
>>>>
>>>
>>>
>>>
>>> --
>>> Thanks & Regards
>>>  Prabu.N
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>>  Prabu.N
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736112.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

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi

I need one help,I want set JMSExpiration value before routing messages.

i tried setting JMSExpiration in .setHeader

But it didn't work.I still seeing JMSExpiration is zero.

*Thanks*
Prabu.N


On Wed, Apr 24, 2013 at 9:28 PM, Prabu <pr...@gmail.com> wrote:

> Please kindly help me.
>
>
> Regards
> Prabu.N
>
>
> On Wed, Apr 24, 2013 at 2:54 PM, Prabu <pr...@gmail.com> wrote:
>
>> Hi All,
>>
>> I am facing some issue in my camel code.
>>
>> Initially i have used java code to route messages from one end to another
>> end.
>>
>> I modified code to route message using camel routing insight of java code.
>>
>> After modified code,i am facing issue in my code.
>>
>> 500 Messages stored in DLQ.testQueue
>>
>> When i try to re-delivery all 500 messages using active-mq API *moveMessageTo
>> method.*
>>
>> 250 or 200 or 100 messages still i can see in DLQ.testQueue.
>>
>> I feel messages re-delivering,But due to some message coming back again
>> into DLQ.
>>
>> Please kindly help me.
>>
>> *Regards*
>> Prabu.N
>>
>>
>> On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
>> ml-node+s465427n5731018h60@n5.nabble.com> wrote:
>>
>>> Hi
>>>
>>> Looks like java needs a hand[1], after
>>> .to(SCHEDULE_QNAME,ONLINE__QNAME),
>>> you can try endChoice()
>>>
>>> [1]
>>>
>>> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
>>>
>>> Taariq
>>>
>>>
>>> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
>>> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
>>> > wrote:
>>>
>>> > Thanks Claus for your response..
>>> >
>>> > I facing some issue in below code
>>> >
>>> > if condition satisfy i want forward into 2 queues,If not it check
>>> second
>>> > condition forward into next queue.
>>> >
>>> >     from(SURVEYINVITATION_QNAME).choice()
>>> > *          .when(SCHEDULE_PREDICATE)*
>>> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
>>> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
>>> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
>>> >           .otherwise()
>>> >               .to(ERQ_QNAME)
>>> >          .end();
>>> >
>>> >
>>> > I am getting compilation error,Please correct me what mistake i am
>>> making
>>> > here
>>> >
>>> > *Regards*
>>> > Prabu.N
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
>>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
>>> wrote:
>>> >
>>> > > Hi
>>> > >
>>> > > If no destinations is returned, then the message is not routed
>>> anywhere.
>>> > >
>>> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
>>> > > <[hidden email] <
>>> http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
>>> > > wrote:
>>> > >
>>> > > > *One quick question.*
>>> > > >
>>> > > >
>>> > >
>>> >
>>> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>>>
>>> > >
>>> > > >
>>> > > > @RecipientList()
>>> > > >  public Set<String> routeTo(Exchange ex) {
>>> > > >
>>> > > >  final Set<String> destinations = new HashSet<String>();
>>> > > >
>>> > > >  //based on condition we add messages header/content ,We add queue
>>> > names
>>> > > in
>>> > > > destinations varible.
>>> > > >  //destinations.add("activemq:queue:listqueue")
>>> > > >
>>> > > >   return destinations;
>>> > > >  }
>>> > > >
>>> > > > some cases,messages content not satisfy any condition and it
>>> returning
>>> > > > empty destinations set.
>>> > > >
>>> > > > If destinations set is empty where message will go?.
>>> > > >
>>> > > > Because,i can't see messages in HHH.InboundQueue and any queues.
>>> > > >
>>> > > > *Regards*
>>> > > > Prabu.N
>>> > > >
>>> > > >
>>> > > >
>>> > > >
>>> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
>>> > > wrote:
>>> > > >
>>> > > >> So for dynamic queue i have to use only recipientlist correct,we
>>> can't
>>> > > use
>>> > > >> .to
>>> > > >>
>>> > > >> One more question,i can't use otherwise in choice please correct
>>> if my
>>> > > >> syntax is wrong.
>>> > > >>
>>> > > >>
>>> > > >> from(INBOUND_QUEUE)
>>> > > >> .choice().when(header(TYPE).isNotNull())
>>> > > >>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>> > > >> .otherwise()
>>> > > >>    .to(ERQ_QNAME)
>>> > > >> .endChoice();
>>> > > >>
>>> > > >> After execute i am getting following error.
>>> > > >>
>>> > > >> Error:
>>> > > >>
>>> > > >> Router.java:22: cannot find symbol
>>> > > >> symbol  : method otherwise()
>>> > > >> location: class
>>> > > >> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>>> > > >> model.ChoiceDefinition>
>>> > > >>            .otherwise()
>>> > > >>            ^
>>> > > >>
>>> > > >>
>>> > > >>
>>> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
>>> > > >> [hidden email] <
>>> http://user/SendEmail.jtp?type=node&node=5731013&i=3
>>>
>>> > >>
>>> > > wrote:
>>> > > >>
>>> > > >>> Hi
>>> > > >>>
>>> > > >>> Yes recipient list uses an expression for evaluating where to
>>> send
>>> > the
>>> > > >>> message to.
>>> > > >>> See its doc
>>> > > >>> http://camel.apache.org/recipient-list.html
>>> > > >>>
>>> > > >>> And this FAQ
>>> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>>> > > >>>
>>> > > >>> And there is no performance overhead. eg when you send the
>>> message to
>>> > > >>> a previous destination, then that endpoints/producer is reused.
>>> > > >>>
>>> > > >>>
>>> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
>>> > > >>> <[hidden email] <
>>> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>>> > >
>>> > > >>> wrote:
>>> > > >>>
>>> > > >>> > Question:1
>>> > > >>> >
>>> > > >>> > I am having code like blow.based on condition i want forward
>>> into
>>> > > >>> dynamic
>>> > > >>> > queue.
>>> > > >>> >
>>> > > >>> >  .when(header(TYPE).isNotNull())
>>> > > >>> >
>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>> > > >>> >
>>> > > >>> > i want to use .to(simple ) insight of .recipientList(simple)
>>> > > >>> >
>>> > > >>> > Please suggest is it possible?.why it is not possible is there
>>> any
>>> > > >>> > performance issue if i use .recipientList(simple)
>>> > > >>> >
>>> > > >>> > Questuon:2
>>> > > >>> >
>>> > > >>> > Error in code
>>> > > >>> >
>>> > > >>> > from(INBOUND_QUEUE)
>>> > > >>> > .choice().when(header(TYPE).isNotNull())
>>> > > >>> >
>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>> > > >>> > .otherwise()
>>> > > >>> >    .to(ERQ_QNAME)
>>> > > >>> > .endChoice();
>>> > > >>> >
>>> > > >>> > After execute i am getting following error.
>>> > > >>> >
>>> > > >>> > Error:
>>> > > >>> >
>>> > > >>> > Router.java:22: cannot find symbol
>>> > > >>> > symbol  : method otherwise()
>>> > > >>> > location: class
>>> > > >>> >
>>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>>> > > >>> > model.ChoiceDefinition>
>>> > > >>> >            .otherwise()
>>> > > >>> >            ^
>>> > > >>> >
>>> > > >>> > Question:3
>>> > > >>> >
>>> > > >>> > I having more than 85 queues.Based on condition i want to
>>> forward
>>> > to
>>> > > >>> correct
>>> > > >>> > queue.
>>> > > >>> >
>>> > > >>> > In my route builder i having code below for all 85 queus.
>>> > > >>> >
>>> > > >>> >   from(ALERT_QNAME).choice()
>>> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>>> > > >>> >           .otherwise()
>>> > > >>> >           .to(ERQ_QNAME)
>>> > > >>> >  .end();
>>> > > >>> >
>>> > > >>> > I feel like because of my code performance getting
>>> degrade.Please
>>> > > >>> suggest if
>>> > > >>> > i am wrong?
>>> > > >>> >
>>> > > >>> > When i open jconsole i am getting white screen and queues some
>>> time
>>> > > not
>>> > > >>> > showing any attribute?
>>> > > >>> >
>>> > > >>> > Please kindly help me.
>>> > > >>> >
>>> > > >>> >
>>> > > >>> >
>>> > > >>> > --
>>> > > >>> > View this message in context:
>>> > > >>>
>>> > >
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>>> > > >>>
>>> > > >>> > Sent from the Camel - Users mailing list archive at
>>> Nabble.com.
>>> > > >>>
>>> > > >>>
>>> > > >>>
>>> > > >>> --
>>> > > >>> Claus Ibsen
>>> > > >>> -----------------
>>> > > >>> Red Hat, Inc.
>>> > > >>> FuseSource is now part of Red Hat
>>> > > >>> Email: [hidden email]<
>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
>>> > > >>> Web: http://fusesource.com
>>> > > >>> Twitter: davsclaus
>>> > > >>> Blog: http://davsclaus.com
>>> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
>>> > > >>>
>>> > > >>>
>>> > > >>> ------------------------------
>>> > > >>>  If you reply to this email, your message will be added to the
>>> > > >>> discussion below:
>>> > > >>>
>>> > > >>>
>>> > >
>>> > > >>> .
>>> > > >>> 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
>>> > >
>>> > >
>>> > > >>>
>>> > > >>
>>> > > >>
>>> > > >>
>>> > > >> --
>>> > > >> Thanks & Regards
>>> > > >>  Prabu.N
>>> > > >>
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > Thanks & Regards
>>> > > >  Prabu.N
>>> > > >
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > View this message in context:
>>> > >
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
>>> > >
>>> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > Claus Ibsen
>>> > > -----------------
>>> > > Red Hat, Inc.
>>> > > FuseSource is now part of Red Hat
>>> > > Email: [hidden email]<
>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
>>> > > Web: http://fusesource.com
>>> > > Twitter: davsclaus
>>> > > Blog: http://davsclaus.com
>>> > > Author of Camel in Action: http://www.manning.com/ibsen
>>> > >
>>> > >
>>> > > ------------------------------
>>> > >  If you reply to this email, your message will be added to the
>>> discussion
>>> > > below:
>>> > >
>>> > >
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
>>> > >  To unsubscribe from Camel routing issue, 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
>>> > >
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > Thanks & Regards
>>> >  Prabu.N
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > View this message in context:
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
>>>
>>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>> >
>>>
>>>
>>> ------------------------------
>>>  If you reply to this email, your message will be added to the
>>> discussion below:
>>>
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731018.html
>>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>>> .
>>> 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>
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>>  Prabu.N
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736113.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi All,

I am facing some issue in my camel code.

Initially i have used java code to route messages from one end to another
end.

I modified code to route message using camel routing insight of java code.

After modified code,i am facing issue in my code.

500 Messages stored in DLQ.testQueue

When i try to re-delivery all 500 messages using active-mq API *moveMessageTo
method.*

250 or 200 or 100 messages still i can see in DLQ.testQueue.

I feel messages re-delivering,But due to some message coming back again
into DLQ.

Please kindly help me.

*Regards*
Prabu.N


On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
ml-node+s465427n5731018h60@n5.nabble.com> wrote:

> Hi
>
> Looks like java needs a hand[1], after .to(SCHEDULE_QNAME,ONLINE__QNAME),
> you can try endChoice()
>
> [1]
>
> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
>
> Taariq
>
>
> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
> > wrote:
>
> > Thanks Claus for your response..
> >
> > I facing some issue in below code
> >
> > if condition satisfy i want forward into 2 queues,If not it check second
> > condition forward into next queue.
> >
> >     from(SURVEYINVITATION_QNAME).choice()
> > *          .when(SCHEDULE_PREDICATE)*
> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
> >           .otherwise()
> >               .to(ERQ_QNAME)
> >          .end();
> >
> >
> > I am getting compilation error,Please correct me what mistake i am
> making
> > here
> >
> > *Regards*
> > Prabu.N
> >
> >
> >
> >
> >
> >
> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
> wrote:
> >
> > > Hi
> > >
> > > If no destinations is returned, then the message is not routed
> anywhere.
> > >
> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
> > > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
>
> > > wrote:
> > >
> > > > *One quick question.*
> > > >
> > > >
> > >
> >
> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>
> > >
> > > >
> > > > @RecipientList()
> > > >  public Set<String> routeTo(Exchange ex) {
> > > >
> > > >  final Set<String> destinations = new HashSet<String>();
> > > >
> > > >  //based on condition we add messages header/content ,We add queue
> > names
> > > in
> > > > destinations varible.
> > > >  //destinations.add("activemq:queue:listqueue")
> > > >
> > > >   return destinations;
> > > >  }
> > > >
> > > > some cases,messages content not satisfy any condition and it
> returning
> > > > empty destinations set.
> > > >
> > > > If destinations set is empty where message will go?.
> > > >
> > > > Because,i can't see messages in HHH.InboundQueue and any queues.
> > > >
> > > > *Regards*
> > > > Prabu.N
> > > >
> > > >
> > > >
> > > >
> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
> > > wrote:
> > > >
> > > >> So for dynamic queue i have to use only recipientlist correct,we
> can't
> > > use
> > > >> .to
> > > >>
> > > >> One more question,i can't use otherwise in choice please correct if
> my
> > > >> syntax is wrong.
> > > >>
> > > >>
> > > >> from(INBOUND_QUEUE)
> > > >> .choice().when(header(TYPE).isNotNull())
> > > >>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> > > >> .otherwise()
> > > >>    .to(ERQ_QNAME)
> > > >> .endChoice();
> > > >>
> > > >> After execute i am getting following error.
> > > >>
> > > >> Error:
> > > >>
> > > >> Router.java:22: cannot find symbol
> > > >> symbol  : method otherwise()
> > > >> location: class
> > > >> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> > > >> model.ChoiceDefinition>
> > > >>            .otherwise()
> > > >>            ^
> > > >>
> > > >>
> > > >>
> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
> > > >> [hidden email] <
> http://user/SendEmail.jtp?type=node&node=5731013&i=3
>
> > >>
> > > wrote:
> > > >>
> > > >>> Hi
> > > >>>
> > > >>> Yes recipient list uses an expression for evaluating where to send
> > the
> > > >>> message to.
> > > >>> See its doc
> > > >>> http://camel.apache.org/recipient-list.html
> > > >>>
> > > >>> And this FAQ
> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> > > >>>
> > > >>> And there is no performance overhead. eg when you send the message
> to
> > > >>> a previous destination, then that endpoints/producer is reused.
> > > >>>
> > > >>>
> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
> > > >>> <[hidden email] <
> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
> > >
> > > >>> wrote:
> > > >>>
> > > >>> > Question:1
> > > >>> >
> > > >>> > I am having code like blow.based on condition i want forward
> into
> > > >>> dynamic
> > > >>> > queue.
> > > >>> >
> > > >>> >  .when(header(TYPE).isNotNull())
> > > >>> >
> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> > > >>> >
> > > >>> > i want to use .to(simple ) insight of .recipientList(simple)
> > > >>> >
> > > >>> > Please suggest is it possible?.why it is not possible is there
> any
> > > >>> > performance issue if i use .recipientList(simple)
> > > >>> >
> > > >>> > Questuon:2
> > > >>> >
> > > >>> > Error in code
> > > >>> >
> > > >>> > from(INBOUND_QUEUE)
> > > >>> > .choice().when(header(TYPE).isNotNull())
> > > >>> >
> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> > > >>> > .otherwise()
> > > >>> >    .to(ERQ_QNAME)
> > > >>> > .endChoice();
> > > >>> >
> > > >>> > After execute i am getting following error.
> > > >>> >
> > > >>> > Error:
> > > >>> >
> > > >>> > Router.java:22: cannot find symbol
> > > >>> > symbol  : method otherwise()
> > > >>> > location: class
> > > >>> > org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> > > >>> > model.ChoiceDefinition>
> > > >>> >            .otherwise()
> > > >>> >            ^
> > > >>> >
> > > >>> > Question:3
> > > >>> >
> > > >>> > I having more than 85 queues.Based on condition i want to
> forward
> > to
> > > >>> correct
> > > >>> > queue.
> > > >>> >
> > > >>> > In my route builder i having code below for all 85 queus.
> > > >>> >
> > > >>> >   from(ALERT_QNAME).choice()
> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
> > > >>> >           .otherwise()
> > > >>> >           .to(ERQ_QNAME)
> > > >>> >  .end();
> > > >>> >
> > > >>> > I feel like because of my code performance getting
> degrade.Please
> > > >>> suggest if
> > > >>> > i am wrong?
> > > >>> >
> > > >>> > When i open jconsole i am getting white screen and queues some
> time
> > > not
> > > >>> > showing any attribute?
> > > >>> >
> > > >>> > Please kindly help me.
> > > >>> >
> > > >>> >
> > > >>> >
> > > >>> > --
> > > >>> > View this message in context:
> > > >>>
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
> > > >>>
> > > >>> > Sent from the Camel - Users mailing list archive at Nabble.com.
> > > >>>
> > > >>>
> > > >>>
> > > >>> --
> > > >>> Claus Ibsen
> > > >>> -----------------
> > > >>> Red Hat, Inc.
> > > >>> FuseSource is now part of Red Hat
> > > >>> Email: [hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
> > > >>> Web: http://fusesource.com
> > > >>> Twitter: davsclaus
> > > >>> Blog: http://davsclaus.com
> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
> > > >>>
> > > >>>
> > > >>> ------------------------------
> > > >>>  If you reply to this email, your message will be added to the
> > > >>> discussion below:
> > > >>>
> > > >>>
> > >
> > > >>> .
> > > >>> 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
> > >
> > >
> > > >>>
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> Thanks & Regards
> > > >>  Prabu.N
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > Thanks & Regards
> > > >  Prabu.N
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
> > >
> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -----------------
> > > Red Hat, Inc.
> > > FuseSource is now part of Red Hat
> > > Email: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
> > > Web: http://fusesource.com
> > > Twitter: davsclaus
> > > Blog: http://davsclaus.com
> > > Author of Camel in Action: http://www.manning.com/ibsen
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
> > >  To unsubscribe from Camel routing issue, 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
> > >
> > >
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731018.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731423.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by Taariq Levack <ta...@gmail.com>.
Hi

Looks like java needs a hand[1], after .to(SCHEDULE_QNAME,ONLINE__QNAME),
you can try endChoice()

[1]
http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html

Taariq


On Wed, Apr 17, 2013 at 11:00 AM, prabumca06@gmail.com <prabumca06@gmail.com
> wrote:

> Thanks Claus for your response..
>
> I facing some issue in below code
>
> if condition satisfy i want forward into 2 queues,If not it check second
> condition forward into next queue.
>
>     from(SURVEYINVITATION_QNAME).choice()
> *          .when(SCHEDULE_PREDICATE)*
>                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
> *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
>                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
>           .otherwise()
>               .to(ERQ_QNAME)
>          .end();
>
>
> I am getting compilation error,Please correct me what mistake i am making
> here
>
> *Regards*
> Prabu.N
>
>
>
>
>
>
> On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5731013h5@n5.nabble.com> wrote:
>
> > Hi
> >
> > If no destinations is returned, then the message is not routed anywhere.
> >
> > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5731013&i=0>
> > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
> > wrote:
> >
> > > *One quick question.*
> > >
> > >
> >
> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
> >
> > >
> > > @RecipientList()
> > >  public Set<String> routeTo(Exchange ex) {
> > >
> > >  final Set<String> destinations = new HashSet<String>();
> > >
> > >  //based on condition we add messages header/content ,We add queue
> names
> > in
> > > destinations varible.
> > >  //destinations.add("activemq:queue:listqueue")
> > >
> > >   return destinations;
> > >  }
> > >
> > > some cases,messages content not satisfy any condition and it returning
> > > empty destinations set.
> > >
> > > If destinations set is empty where message will go?.
> > >
> > > Because,i can't see messages in HHH.InboundQueue and any queues.
> > >
> > > *Regards*
> > > Prabu.N
> > >
> > >
> > >
> > >
> > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
> > wrote:
> > >
> > >> So for dynamic queue i have to use only recipientlist correct,we can't
> > use
> > >> .to
> > >>
> > >> One more question,i can't use otherwise in choice please correct if my
> > >> syntax is wrong.
> > >>
> > >>
> > >> from(INBOUND_QUEUE)
> > >> .choice().when(header(TYPE).isNotNull())
> > >>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> > >> .otherwise()
> > >>    .to(ERQ_QNAME)
> > >> .endChoice();
> > >>
> > >> After execute i am getting following error.
> > >>
> > >> Error:
> > >>
> > >> Router.java:22: cannot find symbol
> > >> symbol  : method otherwise()
> > >> location: class
> > >> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> > >> model.ChoiceDefinition>
> > >>            .otherwise()
> > >>            ^
> > >>
> > >>
> > >>
> > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
> > >> [hidden email] <http://user/SendEmail.jtp?type=node&node=5731013&i=3
> >>
> > wrote:
> > >>
> > >>> Hi
> > >>>
> > >>> Yes recipient list uses an expression for evaluating where to send
> the
> > >>> message to.
> > >>> See its doc
> > >>> http://camel.apache.org/recipient-list.html
> > >>>
> > >>> And this FAQ
> > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> > >>>
> > >>> And there is no performance overhead. eg when you send the message to
> > >>> a previous destination, then that endpoints/producer is reused.
> > >>>
> > >>>
> > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
> > >>> <[hidden email] <
> http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
> >
> > >>> wrote:
> > >>>
> > >>> > Question:1
> > >>> >
> > >>> > I am having code like blow.based on condition i want forward into
> > >>> dynamic
> > >>> > queue.
> > >>> >
> > >>> >  .when(header(TYPE).isNotNull())
> > >>> >   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> > >>> >
> > >>> > i want to use .to(simple ) insight of .recipientList(simple)
> > >>> >
> > >>> > Please suggest is it possible?.why it is not possible is there any
> > >>> > performance issue if i use .recipientList(simple)
> > >>> >
> > >>> > Questuon:2
> > >>> >
> > >>> > Error in code
> > >>> >
> > >>> > from(INBOUND_QUEUE)
> > >>> > .choice().when(header(TYPE).isNotNull())
> > >>> >   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> > >>> > .otherwise()
> > >>> >    .to(ERQ_QNAME)
> > >>> > .endChoice();
> > >>> >
> > >>> > After execute i am getting following error.
> > >>> >
> > >>> > Error:
> > >>> >
> > >>> > Router.java:22: cannot find symbol
> > >>> > symbol  : method otherwise()
> > >>> > location: class
> > >>> > org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> > >>> > model.ChoiceDefinition>
> > >>> >            .otherwise()
> > >>> >            ^
> > >>> >
> > >>> > Question:3
> > >>> >
> > >>> > I having more than 85 queues.Based on condition i want to forward
> to
> > >>> correct
> > >>> > queue.
> > >>> >
> > >>> > In my route builder i having code below for all 85 queus.
> > >>> >
> > >>> >   from(ALERT_QNAME).choice()
> > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
> > >>> >           .otherwise()
> > >>> >           .to(ERQ_QNAME)
> > >>> >  .end();
> > >>> >
> > >>> > I feel like because of my code performance getting degrade.Please
> > >>> suggest if
> > >>> > i am wrong?
> > >>> >
> > >>> > When i open jconsole i am getting white screen and queues some time
> > not
> > >>> > showing any attribute?
> > >>> >
> > >>> > Please kindly help me.
> > >>> >
> > >>> >
> > >>> >
> > >>> > --
> > >>> > View this message in context:
> > >>>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
> > >>>
> > >>> > Sent from the Camel - Users mailing list archive at Nabble.com.
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> Claus Ibsen
> > >>> -----------------
> > >>> Red Hat, Inc.
> > >>> FuseSource is now part of Red Hat
> > >>> Email: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
> > >>> Web: http://fusesource.com
> > >>> Twitter: davsclaus
> > >>> Blog: http://davsclaus.com
> > >>> Author of Camel in Action: http://www.manning.com/ibsen
> > >>>
> > >>>
> > >>> ------------------------------
> > >>>  If you reply to this email, your message will be added to the
> > >>> discussion below:
> > >>>
> > >>>
> >
> > >>> .
> > >>> 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
> >
> >
> > >>>
> > >>
> > >>
> > >>
> > >> --
> > >> Thanks & Regards
> > >>  Prabu.N
> > >>
> > >
> > >
> > >
> > > --
> > > Thanks & Regards
> > >  Prabu.N
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
> >
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Email: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5731013&i=4>
> > Web: http://fusesource.com
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
> >  To unsubscribe from Camel routing issue, click here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
> >
> > .
> > 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
> >
> >
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Thanks Claus for your response..

I facing some issue in below code

if condition satisfy i want forward into 2 queues,If not it check second
condition forward into next queue.

    from(SURVEYINVITATION_QNAME).choice()
*          .when(SCHEDULE_PREDICATE)*
               .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
*           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
               .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
          .otherwise()
              .to(ERQ_QNAME)
         .end();


I am getting compilation error,Please correct me what mistake i am making
here

*Regards*
Prabu.N






On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5731013h5@n5.nabble.com> wrote:

> Hi
>
> If no destinations is returned, then the message is not routed anywhere.
>
> On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5731013&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
> wrote:
>
> > *One quick question.*
> >
> >
> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>
> >
> > @RecipientList()
> >  public Set<String> routeTo(Exchange ex) {
> >
> >  final Set<String> destinations = new HashSet<String>();
> >
> >  //based on condition we add messages header/content ,We add queue names
> in
> > destinations varible.
> >  //destinations.add("activemq:queue:listqueue")
> >
> >   return destinations;
> >  }
> >
> > some cases,messages content not satisfy any condition and it returning
> > empty destinations set.
> >
> > If destinations set is empty where message will go?.
> >
> > Because,i can't see messages in HHH.InboundQueue and any queues.
> >
> > *Regards*
> > Prabu.N
> >
> >
> >
> >
> > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
> wrote:
> >
> >> So for dynamic queue i have to use only recipientlist correct,we can't
> use
> >> .to
> >>
> >> One more question,i can't use otherwise in choice please correct if my
> >> syntax is wrong.
> >>
> >>
> >> from(INBOUND_QUEUE)
> >> .choice().when(header(TYPE).isNotNull())
> >>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> >> .otherwise()
> >>    .to(ERQ_QNAME)
> >> .endChoice();
> >>
> >> After execute i am getting following error.
> >>
> >> Error:
> >>
> >> Router.java:22: cannot find symbol
> >> symbol  : method otherwise()
> >> location: class
> >> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> >> model.ChoiceDefinition>
> >>            .otherwise()
> >>            ^
> >>
> >>
> >>
> >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
> >> [hidden email] <http://user/SendEmail.jtp?type=node&node=5731013&i=3>>
> wrote:
> >>
> >>> Hi
> >>>
> >>> Yes recipient list uses an expression for evaluating where to send the
> >>> message to.
> >>> See its doc
> >>> http://camel.apache.org/recipient-list.html
> >>>
> >>> And this FAQ
> >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> >>>
> >>> And there is no performance overhead. eg when you send the message to
> >>> a previous destination, then that endpoints/producer is reused.
> >>>
> >>>
> >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730920&i=0>
> >>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>
> >>> wrote:
> >>>
> >>> > Question:1
> >>> >
> >>> > I am having code like blow.based on condition i want forward into
> >>> dynamic
> >>> > queue.
> >>> >
> >>> >  .when(header(TYPE).isNotNull())
> >>> >   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> >>> >
> >>> > i want to use .to(simple ) insight of .recipientList(simple)
> >>> >
> >>> > Please suggest is it possible?.why it is not possible is there any
> >>> > performance issue if i use .recipientList(simple)
> >>> >
> >>> > Questuon:2
> >>> >
> >>> > Error in code
> >>> >
> >>> > from(INBOUND_QUEUE)
> >>> > .choice().when(header(TYPE).isNotNull())
> >>> >   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> >>> > .otherwise()
> >>> >    .to(ERQ_QNAME)
> >>> > .endChoice();
> >>> >
> >>> > After execute i am getting following error.
> >>> >
> >>> > Error:
> >>> >
> >>> > Router.java:22: cannot find symbol
> >>> > symbol  : method otherwise()
> >>> > location: class
> >>> > org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> >>> > model.ChoiceDefinition>
> >>> >            .otherwise()
> >>> >            ^
> >>> >
> >>> > Question:3
> >>> >
> >>> > I having more than 85 queues.Based on condition i want to forward to
> >>> correct
> >>> > queue.
> >>> >
> >>> > In my route builder i having code below for all 85 queus.
> >>> >
> >>> >   from(ALERT_QNAME).choice()
> >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
> >>> >           .otherwise()
> >>> >           .to(ERQ_QNAME)
> >>> >  .end();
> >>> >
> >>> > I feel like because of my code performance getting degrade.Please
> >>> suggest if
> >>> > i am wrong?
> >>> >
> >>> > When i open jconsole i am getting white screen and queues some time
> not
> >>> > showing any attribute?
> >>> >
> >>> > Please kindly help me.
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > View this message in context:
> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
> >>>
> >>> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >>>
> >>>
> >>>
> >>> --
> >>> Claus Ibsen
> >>> -----------------
> >>> Red Hat, Inc.
> >>> FuseSource is now part of Red Hat
> >>> Email: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730920&i=2>
> >>> Web: http://fusesource.com
> >>> Twitter: davsclaus
> >>> Blog: http://davsclaus.com
> >>> Author of Camel in Action: http://www.manning.com/ibsen
> >>>
> >>>
> >>> ------------------------------
> >>>  If you reply to this email, your message will be added to the
> >>> discussion below:
> >>>
> >>>
>
> >>> .
> >>> 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>
>
> >>>
> >>
> >>
> >>
> >> --
> >> Thanks & Regards
> >>  Prabu.N
> >>
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5731013&i=4>
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

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

If no destinations is returned, then the message is not routed anywhere.

On Tue, Apr 16, 2013 at 3:44 PM, prabumca06@gmail.com
<pr...@gmail.com> wrote:
> *One quick question.*
>
> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>
> @RecipientList()
>  public Set<String> routeTo(Exchange ex) {
>
>  final Set<String> destinations = new HashSet<String>();
>
>  //based on condition we add messages header/content ,We add queue names in
> destinations varible.
>  //destinations.add("activemq:queue:listqueue")
>
>   return destinations;
>  }
>
> some cases,messages content not satisfy any condition and it returning
> empty destinations set.
>
> If destinations set is empty where message will go?.
>
> Because,i can't see messages in HHH.InboundQueue and any queues.
>
> *Regards*
> Prabu.N
>
>
>
>
> On Mon, Apr 15, 2013 at 10:00 PM, Prabu <pr...@gmail.com> wrote:
>
>> So for dynamic queue i have to use only recipientlist correct,we can't use
>> .to
>>
>> One more question,i can't use otherwise in choice please correct if my
>> syntax is wrong.
>>
>>
>> from(INBOUND_QUEUE)
>> .choice().when(header(TYPE).isNotNull())
>>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> .otherwise()
>>    .to(ERQ_QNAME)
>> .endChoice();
>>
>> After execute i am getting following error.
>>
>> Error:
>>
>> Router.java:22: cannot find symbol
>> symbol  : method otherwise()
>> location: class
>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> model.ChoiceDefinition>
>>            .otherwise()
>>            ^
>>
>>
>>
>> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
>> ml-node+s465427n5730920h22@n5.nabble.com> wrote:
>>
>>> Hi
>>>
>>> Yes recipient list uses an expression for evaluating where to send the
>>> message to.
>>> See its doc
>>> http://camel.apache.org/recipient-list.html
>>>
>>> And this FAQ
>>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>>>
>>> And there is no performance overhead. eg when you send the message to
>>> a previous destination, then that endpoints/producer is reused.
>>>
>>>
>>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730920&i=0>
>>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>>> wrote:
>>>
>>> > Question:1
>>> >
>>> > I am having code like blow.based on condition i want forward into
>>> dynamic
>>> > queue.
>>> >
>>> >  .when(header(TYPE).isNotNull())
>>> >   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>> >
>>> > i want to use .to(simple ) insight of .recipientList(simple)
>>> >
>>> > Please suggest is it possible?.why it is not possible is there any
>>> > performance issue if i use .recipientList(simple)
>>> >
>>> > Questuon:2
>>> >
>>> > Error in code
>>> >
>>> > from(INBOUND_QUEUE)
>>> > .choice().when(header(TYPE).isNotNull())
>>> >   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>> > .otherwise()
>>> >    .to(ERQ_QNAME)
>>> > .endChoice();
>>> >
>>> > After execute i am getting following error.
>>> >
>>> > Error:
>>> >
>>> > Router.java:22: cannot find symbol
>>> > symbol  : method otherwise()
>>> > location: class
>>> > org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>>> > model.ChoiceDefinition>
>>> >            .otherwise()
>>> >            ^
>>> >
>>> > Question:3
>>> >
>>> > I having more than 85 queues.Based on condition i want to forward to
>>> correct
>>> > queue.
>>> >
>>> > In my route builder i having code below for all 85 queus.
>>> >
>>> >   from(ALERT_QNAME).choice()
>>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>>> >           .otherwise()
>>> >           .to(ERQ_QNAME)
>>> >  .end();
>>> >
>>> > I feel like because of my code performance getting degrade.Please
>>> suggest if
>>> > i am wrong?
>>> >
>>> > When i open jconsole i am getting white screen and queues some time not
>>> > showing any attribute?
>>> >
>>> > Please kindly help me.
>>> >
>>> >
>>> >
>>> > --
>>> > View this message in context:
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>>>
>>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> Red Hat, Inc.
>>> FuseSource is now part of Red Hat
>>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730920&i=2>
>>> Web: http://fusesource.com
>>> Twitter: davsclaus
>>> Blog: http://davsclaus.com
>>> Author of Camel in Action: http://www.manning.com/ibsen
>>>
>>>
>>> ------------------------------
>>>  If you reply to this email, your message will be added to the
>>> discussion below:
>>>
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730920.html
>>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>>> .
>>> 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>
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>>  Prabu.N
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
*One quick question.*

from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")

@RecipientList()
 public Set<String> routeTo(Exchange ex) {

 final Set<String> destinations = new HashSet<String>();

 //based on condition we add messages header/content ,We add queue names in
destinations varible.
 //destinations.add("activemq:queue:listqueue")

  return destinations;
 }

some cases,messages content not satisfy any condition and it returning
empty destinations set.

If destinations set is empty where message will go?.

Because,i can't see messages in HHH.InboundQueue and any queues.

*Regards*
Prabu.N




On Mon, Apr 15, 2013 at 10:00 PM, Prabu <pr...@gmail.com> wrote:

> So for dynamic queue i have to use only recipientlist correct,we can't use
> .to
>
> One more question,i can't use otherwise in choice please correct if my
> syntax is wrong.
>
>
> from(INBOUND_QUEUE)
> .choice().when(header(TYPE).isNotNull())
>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> .otherwise()
>    .to(ERQ_QNAME)
> .endChoice();
>
> After execute i am getting following error.
>
> Error:
>
> Router.java:22: cannot find symbol
> symbol  : method otherwise()
> location: class
> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> model.ChoiceDefinition>
>            .otherwise()
>            ^
>
>
>
> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5730920h22@n5.nabble.com> wrote:
>
>> Hi
>>
>> Yes recipient list uses an expression for evaluating where to send the
>> message to.
>> See its doc
>> http://camel.apache.org/recipient-list.html
>>
>> And this FAQ
>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>>
>> And there is no performance overhead. eg when you send the message to
>> a previous destination, then that endpoints/producer is reused.
>>
>>
>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730920&i=0>
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>> wrote:
>>
>> > Question:1
>> >
>> > I am having code like blow.based on condition i want forward into
>> dynamic
>> > queue.
>> >
>> >  .when(header(TYPE).isNotNull())
>> >   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> >
>> > i want to use .to(simple ) insight of .recipientList(simple)
>> >
>> > Please suggest is it possible?.why it is not possible is there any
>> > performance issue if i use .recipientList(simple)
>> >
>> > Questuon:2
>> >
>> > Error in code
>> >
>> > from(INBOUND_QUEUE)
>> > .choice().when(header(TYPE).isNotNull())
>> >   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> > .otherwise()
>> >    .to(ERQ_QNAME)
>> > .endChoice();
>> >
>> > After execute i am getting following error.
>> >
>> > Error:
>> >
>> > Router.java:22: cannot find symbol
>> > symbol  : method otherwise()
>> > location: class
>> > org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> > model.ChoiceDefinition>
>> >            .otherwise()
>> >            ^
>> >
>> > Question:3
>> >
>> > I having more than 85 queues.Based on condition i want to forward to
>> correct
>> > queue.
>> >
>> > In my route builder i having code below for all 85 queus.
>> >
>> >   from(ALERT_QNAME).choice()
>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>> >           .otherwise()
>> >           .to(ERQ_QNAME)
>> >  .end();
>> >
>> > I feel like because of my code performance getting degrade.Please
>> suggest if
>> > i am wrong?
>> >
>> > When i open jconsole i am getting white screen and queues some time not
>> > showing any attribute?
>> >
>> > Please kindly help me.
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730920&i=2>
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730920.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
So for dynamic queue i have to use only recipientlist correct,we can't use
.to

One more question,i can't use otherwise in choice please correct if my
syntax is wrong.

from(INBOUND_QUEUE)
.choice().when(header(TYPE).isNotNull())
  .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
.otherwise()
   .to(ERQ_QNAME)
.endChoice();

After execute i am getting following error.

Error:

Router.java:22: cannot find symbol
symbol  : method otherwise()
location: class
org.apache.camel.model.RecipientListDefinition<org.apache.camel.
model.ChoiceDefinition>
           .otherwise()
           ^



On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5730920h22@n5.nabble.com> wrote:

> Hi
>
> Yes recipient list uses an expression for evaluating where to send the
> message to.
> See its doc
> http://camel.apache.org/recipient-list.html
>
> And this FAQ
> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>
> And there is no performance overhead. eg when you send the message to
> a previous destination, then that endpoints/producer is reused.
>
>
> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730920&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
> wrote:
>
> > Question:1
> >
> > I am having code like blow.based on condition i want forward into
> dynamic
> > queue.
> >
> >  .when(header(TYPE).isNotNull())
> >   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> >
> > i want to use .to(simple ) insight of .recipientList(simple)
> >
> > Please suggest is it possible?.why it is not possible is there any
> > performance issue if i use .recipientList(simple)
> >
> > Questuon:2
> >
> > Error in code
> >
> > from(INBOUND_QUEUE)
> > .choice().when(header(TYPE).isNotNull())
> >   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> > .otherwise()
> >    .to(ERQ_QNAME)
> > .endChoice();
> >
> > After execute i am getting following error.
> >
> > Error:
> >
> > Router.java:22: cannot find symbol
> > symbol  : method otherwise()
> > location: class
> > org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> > model.ChoiceDefinition>
> >            .otherwise()
> >            ^
> >
> > Question:3
> >
> > I having more than 85 queues.Based on condition i want to forward to
> correct
> > queue.
> >
> > In my route builder i having code below for all 85 queus.
> >
> >   from(ALERT_QNAME).choice()
> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
> >           .otherwise()
> >           .to(ERQ_QNAME)
> >  .end();
> >
> > I feel like because of my code performance getting degrade.Please
> suggest if
> > i am wrong?
> >
> > When i open jconsole i am getting white screen and queues some time not
> > showing any attribute?
> >
> > Please kindly help me.
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730920&i=2>
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730920.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730926.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

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

Yes recipient list uses an expression for evaluating where to send the
message to.
See its doc
http://camel.apache.org/recipient-list.html

And this FAQ
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html

And there is no performance overhead. eg when you send the message to
a previous destination, then that endpoints/producer is reused.


On Mon, Apr 15, 2013 at 2:05 PM, prabumca06@gmail.com
<pr...@gmail.com> wrote:
> Question:1
>
> I am having code like blow.based on condition i want forward into dynamic
> queue.
>
>  .when(header(TYPE).isNotNull())
>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>
> i want to use .to(simple ) insight of .recipientList(simple)
>
> Please suggest is it possible?.why it is not possible is there any
> performance issue if i use .recipientList(simple)
>
> Questuon:2
>
> Error in code
>
> from(INBOUND_QUEUE)
> .choice().when(header(TYPE).isNotNull())
>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> .otherwise()
>    .to(ERQ_QNAME)
> .endChoice();
>
> After execute i am getting following error.
>
> Error:
>
> Router.java:22: cannot find symbol
> symbol  : method otherwise()
> location: class
> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> model.ChoiceDefinition>
>            .otherwise()
>            ^
>
> Question:3
>
> I having more than 85 queues.Based on condition i want to forward to correct
> queue.
>
> In my route builder i having code below for all 85 queus.
>
>   from(ALERT_QNAME).choice()
>           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>           .otherwise()
>           .to(ERQ_QNAME)
>  .end();
>
> I feel like because of my code performance getting degrade.Please suggest if
> i am wrong?
>
> When i open jconsole i am getting white screen and queues some time not
> showing any attribute?
>
> Please kindly help me.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Question:1

I am having code like blow.based on condition i want forward into dynamic
queue.

 .when(header(TYPE).isNotNull())
  .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))

i want to use .to(simple ) insight of .recipientList(simple)

Please suggest is it possible?.why it is not possible is there any
performance issue if i use .recipientList(simple)

Questuon:2

Error in code

from(INBOUND_QUEUE)
.choice().when(header(TYPE).isNotNull())
  .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
.otherwise()
   .to(ERQ_QNAME)
.endChoice();

After execute i am getting following error.

Error:

Router.java:22: cannot find symbol
symbol  : method otherwise()
location: class
org.apache.camel.model.RecipientListDefinition<org.apache.camel.
model.ChoiceDefinition>
           .otherwise()
           ^

Question:3

I having more than 85 queues.Based on condition i want to forward to correct
queue.

In my route builder i having code below for all 85 queus.

  from(ALERT_QNAME).choice()
          .when(ALERT_PREDICATE).to(ALERT_QNAME)         
          .otherwise()
          .to(ERQ_QNAME)
 .end();

I feel like because of my code performance getting degrade.Please suggest if
i am wrong?
 
When i open jconsole i am getting white screen and queues some time not
showing any attribute?

Please kindly help me.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi Chris/Claus,

*Question:1*

I am having code like blow.based on condition i want forward into dynamic
queue.

 .when(header(TYPE).isNotNull())
  .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))

i want to use .to(simple ) insight of .recipientList(simple)

Please suggest is it possible?.why it is not possible is there any
performance issue if i use .recipientList(simple)

*Question:2*

 I having more than 85 queues.Based on condition i want to forward to
correct queue.

In my route builder i having code below for all 85 queus.

  from(ALERT_QNAME).choice()
          .when(ALERT_PREDICATE).to(ALERT_QNAME)
          .otherwise()
          .to(ERQ_QNAME)
 .end();

I feel like because of my code performance getting degrade.Please suggest
if i am wrong?

When i open jconsole i am getting white screen and queues some time not
showing any attribute?


Please kindly help me.

*Regards*
Prabu.N


On Wed, Apr 10, 2013 at 7:39 PM, Chris Wolf [via Camel] <
ml-node+s465427n5730662h24@n5.nabble.com> wrote:

> You're asking about a problem with "CARD_EVENT_PREDICATE" without
> including
> the definition of that?
>
>
> On Tue, Apr 9, 2013 at 8:31 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730662&i=1>>wrote:
>
>
> > Hi Chris,
> >
> > from(CARD_TYPE_SPECIFIC_QNAME).choice()
> > .when(SCHEDULE_PREDICATE).multicast().to(CARD_QNAME,SCHEDULE_QNAME);
> > .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
> > .otherwise()
> > .setHeader(PROPERTY_ORIGINAL_DESTINATION,
> > constant(PROPERTY_ORIGINAL_DESTINATION_VALUE))
> > .to(ERQ_QNAME)
> > .end();
> >
> > When i compile above code i am getting followin
> >
> > lder.java:115: illegal start of expression
> >     .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
> >               ^
> >
> > Please kindly help me,i am doing any syntax mistake here
> >
> > *Regards*
> > Prabu.N
> >
> >
> >
> >
> >
> > On Fri, Apr 5, 2013 at 3:58 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=2>>
> wrote:
> >
> > > Thanks Chris/Claus it worked,
> > >
> > >
> > > Hi Chris/Claus,
> > >
> > > When running active-mq 5.8 i am getting following issue,do you have
> any
> > > idea.
> > >
> > > 2013-04-05 05:26:16,312 | WARN  | Async error occurred:
> > > java.lang.IllegalStateException: Cannot add a consumer to a connection
> > that
> > > had not been registered:
> > >
> > >
> > > *Regards*
> > > Prabu.N
> > >
> > >
> > >
> > >
> > > On Thu, Apr 4, 2013 at 6:55 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=3>>
> wrote:
> > >
> > >> 1.) You're NOT using my code - it's still the same as you had before
> > >> 2.) You're still calling setHeader(java.lang.String,
> java.lang.String)
> > >>      even though I tried to tell you that it has to be
> > >>      setHeader(java.lang.String, org.apache.camel.Expression)
> > >>
> > >> On Wed, Apr 3, 2013 at 2:51 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=4>>
> wrote:
> > >> > Please kindly help me...
> > >> >
> > >> > On Apr 3, 2013 8:54 PM, "Prabu" <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=5>>
> wrote:
> > >> >>
> > >> >> Hi Chris,
> > >> >>
> > >> >> I used your code.But i am getting following compilation error
> > >> >>
> > >> >> lder.java:92: cannot find symbol
> > >> >> symbol  : method setHeader(java.lang.String,java.lang.String)
> > >> >> location: class org.apache.camel.model.ChoiceDefinition
> > >> >>                   .otherwise().setHeader("MyHeader","sdfsdf")
> > >> >>
> > >> >>
> > >> >> Note: I am using camel 2.10 version
> > >> >>
> > >> >>
> > >> >>
> > >> >> On Wed, Apr 3, 2013 at 8:22 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=6>>
>
> > >> wrote:
> > >> >>>
> > >> >>> Hi Prabu,
> > >> >>>
> > >> >>> I don't mind helping, but could you continue to use the
> > >> >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=7>rather then my private email?  That way, if
> > >> >>> other people have similar issues, they can benefit.
> > >> >>>
> > >> >>>
> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> > >> >>>            .otherwise()
> > >> >>>            .setHeader("MyHeader", constant("some-value"))  //
> <===
> > Set
> > >> >>> Header
> > >> >>>            .to(ERQ_QNAME)
> > >> >>>    .end();
> > >> >>>
> > >> >>> This technique will use the "simple" language function "constant"
> to
> > >> >>> set a string constant value.
> > >> >>> If the value you need to set is dynamic, then you could use a
> > >> >>> property placeholder.
> > >> >>>
> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> > >> >>>            .otherwise()
> > >> >>>            .setHeader("MyHeader", constant("{{some-prop}}"))  //
> > <===
> > >> Set
> > >> >>> Header
> > >> >>>            .to(ERQ_QNAME)
> > >> >>>    .end();
> > >> >>>
> > >> >>> There are even more sophisticated ways to acquire dynamic values:
> > >> >>>
> > >> >>> http://camel.apache.org/python.html
> > >> >>>
> > >> >>> Regards,
> > >> >>>
> > >> >>> Chris
> > >> >>>
> > >> >>> On Wed, Apr 3, 2013 at 9:52 AM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=8>>
> wrote:
> > >> >>> > I have code like this,
> > >> >>> >
> > >> >>> >     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice()
> > >> >>> >           .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> > >> >>> >           .otherwise().to(ERQ_QNAME)
> > >> >>> >    .end();
> > >> >>> >
> > >> >>> >     from(DEACTIVATIN_TYPE_SPECIFIC_QNAME).choice()
> > >> >>> >
> > >> >>> > .when(ALERT_FAILURE_HANDLER_PREDICATE).to(ALERT_FAILURE_QNAME)
> > >> >>> >           .otherwise().to(ERQ_QNAME)
> > >> >>> >     .end();
> > >> >>> >
> > >> >>> > I want to set some values to header inside otherwise that is
> > before
> > >> >>> > message
> > >> >>> > move to ERQ_QNAME.
> > >> >>> >
> > >> >>> > please kindly help me how to do that.
> > >> >>> >
> > >> >>> > Regards
> > >> >>> > Prabu.N
> > >> >>> >
> > >> >>> >
> > >> >>> > On Tue, Apr 2, 2013 at 10:52 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=9>>
>
> > >> wrote:
> > >> >>> >>
> > >> >>> >> No,i didn't received ...
> > >> >>> >>
> > >> >>> >> Regards
> > >> >>> >> Prabu.N
> > >> >>> >>
> > >> >>> >>
> > >> >>> >> On Tue, Apr 2, 2013 at 7:31 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=10>
> > >
> > >> >>> >> wrote:
> > >> >>> >>>
> > >> >>> >>> Hi Prabu,
> > >> >>> >>>
> > >> >>> >>> Just out of curiosity - I am wondering if saw my email I sent
> > >> >>> >>> yesterday in response to your question?
> > >> >>> >>> I sent it to "[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=11>"
> with the subject,
> > >> >>> >>> "Content-based routing with Expressions and Predicates"...
> > >> >>> >>>
> > >> >>> >>> Regards,
> > >> >>> >>>
> > >> >>> >>> Chris
> > >> >>> >>>
> > >> >>> >>> On Tue, Apr 2, 2013 at 4:17 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=12>
> > >> >>> >>> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=13>>
> wrote:
> > >> >>> >>> > I have found solution in internet using Predicate  we can
> > >> achieve
> > >> >>> >>> > this,
> > >> >>> >>> >
> > >> >>> >>> > But,one doubt in the link
> > >> >>> >>> > http://camel.apache.org/predicate.html,Theymentioned that
> we
> > >> can
> > >> >>> >>> > use
> > >> >>> >>> > AND and OR in Predicate
> > >> >>> >>> >
> > >> >>> >>> > I have added below code in project,But i am getting
> > compilation
> > >> >>> >>> > error.Please kindly help
> > >> >>> >>> >
> > >> >>> >>> > *Predicate god = and(admin, or(body().contains("Camel
> Rider"),
> > >> >>> >>> > header("type").isEqualTo("god")));*
> > >> >>> >>> >
> > >> >>> >>> > *Thanks*
> > >> >>> >>> > Prabu.N
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=14>>
>
> > >> wrote:
> > >> >>> >>> >
> > >> >>> >>> >> Hi *Chris / **Claus*,
> > >> >>> >>> >>
> > >> >>> >>> >> I have one *Inbound* queue,based on header and content
> type,I
> > >> want
> > >> >>> >>> >> forward to outbound queue.
> > >> >>> >>> >> *
> > >> >>> >>> >> Example 1:
> > >> >>> >>> >> *
> > >> >>> >>> >> *
> > >> >>> >>> >> Inbound.queue name : **Inbound.Test.DDD
> > >> >>> >>> >> Outbound.queue name : SOURHQueueName
> > >> >>> >>> >>
> > >> >>> >>> >> *
> > >> >>> >>> >> *Criteria or Condition :
> > >> >>> >>> >> *
> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
> > >> >>> >>> >>    *AND*
> > >> >>> >>> >> Message *Type* value is : *card.test *or*
> card.expiry.test*
> > >> >>> >>> >>
> > >> >>> >>> >> *Example 2:*
> > >> >>> >>> >>
> > >> >>> >>> >> *Inbound.queue name : **Inbound.Test.SSS
> > >> >>> >>> >> Outbound.queue name : WESTQueueName
> > >> >>> >>> >> *
> > >> >>> >>> >> *Criteria or Condition :*
> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
> > >> >>> >>> >>  *AND
> > >> >>> >>> >> *
> > >> >>> >>> >> Message *Type *value *start with* :*card.event*
> > >> >>> >>> >>
> > >> >>> >>> >> I want achieve this using camel routing java DSL.
> > >> >>> >>> >>
> > >> >>> >>> >> Please help me.How can i use AND,OR and regular expression
> in
> > >> >>> >>> >> camel
> > >> >>> >>> >> routing
> > >> >>> >>> >>
> > >> >>> >>> >> *Regards*
> > >> >>> >>> >> Prabu.N
> > >> >>> >>> >>
> > >> >>> >>> >>
> > >> >>> >>> >> On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
> > >> >>> >>> >> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=15>>
> wrote:
> > >> >>> >>> >>
> > >> >>> >>> >>> Hi Claus,
> > >> >>> >>> >>>
> > >> >>> >>> >>> Thanks for the response - I could not see any obvious way
> to
> > >> >>> >>> >>> configure
> > >> >>> >>> >>> an FTP Consumer at ***runtime***,
> > >> >>> >>> >>> either via bean, processor or consumer template.  If you
> > have
> > >> a
> > >> >>> >>> >>> concrete example, that would be great to see...
> > >> >>> >>> >>>
> > >> >>> >>> >>> ...otherwise, here's the solution I came up with:
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>     -Chris
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>   // simulate incoming message from JMS...
> > >> >>> >>> >>>   from("timer:kickoff?repeatCount=1")
> > >> >>> >>> >>>   .to("direct:start");
> > >> >>> >>> >>>
> > >> >>> >>> >>>   // upon receipt of FTP config from JMS, invoke
> > >>  FtpConfigurer
> > >> >>> >>> >>> bean
> > >> >>> >>> >>> to reconfigure
> > >> >>> >>> >>>   // FTP route, then start it...
> > >> >>> >>> >>>   from("direct:start")
> > >> >>> >>> >>>   .beanRef("configRdr") // config reader bean not shown
> here
> > >> >>> >>> >>>   .convertBodyTo(Document.class)
> > >> >>> >>> >>>   // sets a bunch of headers from DOM, e.g.:
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>
> > >> >>> >>> >>>
> > >> >>> >>> >>> String.class)
> > >> >>> >>> >>>   .setHeader("ftp-route-id", constant("ftp.route"))
> > >> >>> >>> >>>   .beanRef("ftpConfigurer");
> > >> >>> >>> >>>
> > >> >>> >>> >>>   // FTP route will only be started by FtpConfigurer bean
> > >> after
> > >> >>> >>> >>> it's
> > >> >>> >>> >>> dynamically re-configured...
> > >> >>> >>> >>>   from("ftp://bogushost/bogusdir?startScheduler=false")
> //
> > >> the
> > >> >>> >>> >>> URI
> > >> >>> >>> >>> will be reconfigured...
> > >> >>> >>> >>>   .routeId("ftp.route").noAutoStartup()
> > >> >>> >>> >>>   .log("Received file ${file:onlyname}")
> > >> >>> >>> >>>   .to("file:/tmp/local/data");
> > >> >>> >>> >>>
> > >> >>> >>> >>>   public class FtpConfigurer {
> > >> >>> >>> >>>     public void configureFtpConsumer(Exchange exchange)
> > throws
> > >> >>> >>> >>> Exception
> > >> >>> >>> >>> {
> > >> >>> >>> >>>         CamelContext context = exchange.getContext();
> > >> >>> >>> >>>         Map<String, Object> headers =
> > >> >>> >>> >>> exchange.getIn().getHeaders();
> > >> >>> >>> >>>         Map<String, Object> parameters = new
> HashMap<String,
> > >> >>> >>> >>> Object>();
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // Filter headers for ftp-config specific
> headers...
> > >> >>> >>> >>>         for (Map.Entry<String, Object> entry :
> > >> >>> >>> >>> headers.entrySet()) {
> > >> >>> >>> >>>             String key = entry.getKey();
> > >> >>> >>> >>>             if (key.startsWith("ftp-config."))
> > >> >>> >>> >>>
> > >> >>> >>> >>> parameters.put(key.substring("ftp-config.".length()),
> > >> >>> >>> >>> entry.getValue());
> > >> >>> >>> >>>         }
> > >> >>> >>> >>>
> > >> >>> >>> >>>         String routeId =
> > >> >>> >>> >>> exchange.getIn().getHeader("ftp-route-id",
> > >> >>> >>> >>> String.class);
> > >> >>> >>> >>>         Route ftpRoute = context.getRoute(routeId);
> > >> >>> >>> >>>         FtpConsumer c = (FtpConsumer)
> > ftpRoute.getConsumer();
> > >> >>> >>> >>>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
> > >> >>> >>> >>> c.getEndpoint();
> > >> >>> >>> >>>         FtpConfiguration rfc = rfe.getConfiguration();
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // Need to crack open FtpConsumer's
> "endpointPath"
> > >> field
> > >> >>> >>> >>> since
> > >> >>> >>> >>>         // there's no mutator (setter)
> > >> >>> >>> >>>         Class<?> cls = c.getClass();
> > >> >>> >>> >>>         Field endpointPath_fld =
> > >> >>> >>> >>> cls.getDeclaredField("endpointPath");
> > >> >>> >>> >>>         endpointPath_fld.setAccessible(true);
> > >> >>> >>> >>>         endpointPath_fld.set(c,
> > >> >>> >>> >>> (String)parameters.get("directory"));
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // Need to crack open FtpEndpoint, actually
> > >> >>> >>> >>> DefaultEndpoint -
> > >> >>> >>> >>> the ultimate base class
> > >> >>> >>> >>>         // since there's no mutator (setter) for the
> > >> >>> >>> >>> "endpointUri"
> > >> >>> >>> >>> field
> > >> >>> >>> >>>         cls = rfe.getClass();
> > >> >>> >>> >>>         Field endpointUri_fld = null;
> > >> >>> >>> >>>         while (endpointUri_fld == null) {
> > >> >>> >>> >>>             // TODO: maybe change logic to just stop at
> > >> >>> >>> >>> class=DefaultEndpoint
> > >> >>> >>> >>>             // rather then using NoSuchFieldException
> > >> >>> >>> >>>             try {
> > >> >>> >>> >>>                 endpointUri_fld =
> > >> >>> >>> >>> cls.getDeclaredField("endpointUri");
> > >> >>> >>> >>>             } catch (NoSuchFieldException nsfe) {
> > >> >>> >>> >>>                 cls = cls.getSuperclass();
> > >> >>> >>> >>>             }
> > >> >>> >>> >>>         }
> > >> >>> >>> >>>         endpointUri_fld.setAccessible(true);
> > >> >>> >>> >>>         endpointUri_fld.set(rfe,
> > >> >>> >>> >>>             String.format("ftp://%s/%s",
> > >> >>> >>> >>> (String)parameters.get("host"),
> > >> >>> >>> >>> (String)parameters.get("directory")));
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // set reference properties first as they use #
> > syntax
> > >> >>> >>> >>> that
> > >> >>> >>> >>> fools the regular properties setter
> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
> rfc,
> > >> >>> >>> >>> parameters);
> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfc,
> > >> parameters);
> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
> rfe,
> > >> >>> >>> >>> parameters);
> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfe,
> > >> parameters);
> > >> >>> >>> >>>         c.setStartScheduler(true);
> > >> >>> >>> >>>
> > >> >>> >>> >>>         context.startRoute(routeId);
> > >> >>> >>> >>>   }
> > >> >>> >>> >>> }
> > >> >>> >>> >>>
> > >> >>> >>> >>> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden
> > >> >>> >>> >>> email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=0
> > >>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>>
> > >> >>> >>> >>> > Hi
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > See this EIP
> > >> >>> >>> >>> > http://camel.apache.org/content-enricher.html
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > About pollEnrich.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > Though pollEnrich currently does support dynamic uris.
> Its
> > >> on
> > >> >>> >>> >>> > the
> > >> >>> >>> >>> roadmap,
> > >> >>> >>> >>> > for Camel 3.0.
> > >> >>> >>> >>> > It requires an API change and thus isn't so easy to
> > >> implement
> > >> >>> >>> >>> > currently
> > >> >>> >>> >>> on
> > >> >>> >>> >>> > 2.x.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > You can always use a java bean / camel processor, and
> > >> consume
> > >> >>> >>> >>> > the
> > >> >>> >>> >>> > ftp
> > >> >>> >>> >>> file
> > >> >>> >>> >>> > from java code.
> > >> >>> >>> >>> > For example using consumer template.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > As you use FTP you may want to set disconnect=true so
> the
> > >> >>> >>> >>> > connect
> > >> >>> >>> >>> > is
> > >> >>> >>> >>> not
> > >> >>> >>> >>> > remained open after usage.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden
> > >> >>> >>> >>> > email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=1
> > >> >>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >> Ok, I'm starting to get it - a little bit.  As for my
> > >> concrete
> > >> >>> >>> >>> >> example, so far, I have:
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>                 from("direct:start")
> > >> >>> >>> >>> >>                 .beanRef("config")
> > >> >>> >>> >>> >>                 .convertBodyTo(Document.class)
> > >> >>> >>> >>> >>                 .recipientList().xquery(
> > >> >>> >>> >>> >>                     "concat('ftp://'" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/server/@value" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> +
> > >> >>> >>> >>> >>                     ",'?noop=true&amp;username='" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> > >> >>> >>> >>> >>                     ",'&amp;password='" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> ",//remote[vendorId/@value='CBOE34']/password/@value)",
> > >> >>> >>> >>> >> String.class);
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> Here's the problem - this will create an FTP Producer
> -
> > >> that's
> > >> >>> >>> >>> >> not
> > >> >>> >>> >>> >> what I need.  I need a dynamically
> > >> >>> >>> >>> >> constructed URI for a polling FTP consumer.  I don't
> > think
> > >> >>> >>> >>> >> "recipientList" will work...   Any ideas?
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> Thanks,
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> Chris
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden
> > >> >>> >>> >>> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>> >> > Hi Claus,
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > I hate to ask this - but I still don't get it.  I
> > thought
> > >> >>> >>> >>> >> > "recipientList" was for sending to multiple,
> > >> runtime-defined
> > >> >>> >>> >>> >> > recipients.  I don't see how this
> > >> >>> >>> >>> >> > answers the question of sending to one, single
> > recipient,
> > >> >>> >>> >>> >> > whose
> > >> >>> >>> >>> >> > URI
> > >> >>> >>> >>> is
> > >> >>> >>> >>> >> > dynamically constructed - and in my use-case the
> > dynamic
> > >> >>> >>> >>> >> > settings
> > >> >>> >>> >>> >> > are not in properties - so "simple" (property
> > >> place-holders)
> > >> >>> >>> >>> >> > won't
> > >> >>> >>> >>> help
> > >> >>> >>> >>> >> me.
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > Let me give you a concrete example.  I need to do an
> > ftp
> > >> >>> >>> >>> >> > download
> > >> >>> >>> >>> and
> > >> >>> >>> >>> >> > the connection information comes from up-stream in
> the
> > >> route
> > >> >>> >>> >>> >> > in
> > >> >>> >>> >>> >> > the
> > >> >>> >>> >>> >> > form of XML (DOM - a Document instance).  Currently,
> I
> > am
> > >> >>> >>> >>> >> > trying
> > >> >>> >>> >>> >> > to
> > >> >>> >>> >>> do
> > >> >>> >>> >>> >> > this with bean binding and method params decorated
> with
> > >> >>> >>> >>> >> > @XPath
> > >> >>> >>> >>> >> > pointing into the Document with the ftp settings and
> > >> inside
> > >> >>> >>> >>> >> > the
> > >> >>> >>> >>> >> > this method doing:
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > FtpComponent ftpComponent =
> context.getComponent("ftp",
> > >> >>> >>> >>> >> FtpComponent.class);
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > ..and then attempt to get the endpoint and call
> > >> >>> >>> >>> >> > createConsumer(...).
> > >> >>> >>> >>> >> > I'm sure this is not the right way to do it, but I
> > don't
> > >> see
> > >> >>> >>> >>> >> > how
> > >> >>> >>> >>> else
> > >> >>> >>> >>> >> > - any ideas?
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > Thanks,
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > Chris
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen
> <[hidden
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> wrote:
> > >> >>> >>> >>> >> >> Hi
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> See this FAQ
> > >> >>> >>> >>> >> >>
> > >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=4>
> > >> >>> >>> >>> >> >> <[hidden
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>> Thanks Walzer..
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>> *Queston1:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>> *Example*
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> .when(header("foo").isEqualTo("bar"))
> > >> >>> >>> >>> >> >>>                     .to("direct:b")
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> In my case i have to add more than 80 condition
> and
> > >> >>> >>> >>> >> >>> forwards
> > >> >>> >>> >>> >> >>> to 80
> > >> >>> >>> >>> >> >>> different queues.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Above example i can only hard-code queue name,But
> > what
> > >> i
> > >> >>> >>> >>> >> >>> want
> > >> >>> >>> >>> >> >>> is
> > >> >>> >>> >>> below.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> * .when(header("Type").isNotNull())
> > >> >>> >>> >>> >> >>>     .to("activemq.Inbound."+header("Type"))
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Example:If queue type is test,It should forward to
> > >> >>> >>> >>> >> >>> *Inbound.test*
> > >> >>> >>> >>> >> queue.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Above example i tried,but it did not
> worked,created
> > >> queue
> > >> >>> >>> >>> something
> > >> >>> >>> >>> >> >>> like this *Inbound.header("type")*
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> *Question2*:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> from("direct:a")
> > >> >>> >>> >>> >> >>>             .multicast().to("direct:b",
> "direct:c",
> > >> >>> >>> >>> >> >>> "direct:d");
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Based on messages header and content type i want
> > >> forward
> > >> >>> >>> >>> >> >>> to
> > >> >>> >>> >>> different
> > >> >>> >>> >>> >> >>> queue.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> condition will be *OR *and *AND*.How can i do that
> > like
> > >> >>> >>> >>> >> >>> above
> > >> >>> >>> >>> example.*
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Thanks in advance*
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> *Regards*
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Prabu.N
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas
> [via
> > >> >>> >>> >>> >> >>> Camel] <
> > >> >>> >>> >>> >> >>> [hidden
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> > Hi,
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > you could start by reading Claus´ book (p. 44ff)
> > >> which
> > >> >>> >>> >>> >> >>> > has a
> > >> >>> >>> >>> perfect
> > >> >>> >>> >>> >> >>> > example or
> > >> >>> >>> >>> >> >>> >
> http://camel.apache.org/content-based-router.html
> > >> >>> >>> >>> >> >>> > (just
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> >>> > replace the direct: with your queues).
> > >> >>> >>> >>> >> >>> > If you need to fire your messages to multiple
> > queues:
> > >> >>> >>> >>> >> >>> >
> > >> http://camel.apache.org/publish-subscribe-channel.html
> > >> >>> >>> >>> >> >>> > shows
> > >> >>> >>> >>> you the
> > >> >>> >>> >>> >> >>> > various ways.
> > >> >>> >>> >>> >> >>> > When you get the concepts you can just "lego"
> them
> > >> >>> >>> >>> >> >>> > together.
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > Regards, Thomas.
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> > >> >>> >>> >>> >> >>>
> http://user/SendEmail.jtp?type=node&node=5730116&i=0
> > >"
> > >> >>> >>> >>> >> >>> > <[hidden email] <
> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > > Hi Claus,
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > Thanks so much Clus for help.It is working
> now.
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > I need your guidance for the following
> > requirement.
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > 1.I have one *inbound queue* it will receive
> > >> message
> > >> >>> >>> >>> frequently
> > >> >>> >>> >>> >> from my
> > >> >>> >>> >>> >> >>> > > application.
> > >> >>> >>> >>> >> >>> > > 2.From *inbound queue* i need camel routing to
> > move
> > >> >>> >>> >>> >> >>> > > message
> > >> >>> >>> >>> from
> > >> >>> >>> >>> >> >>> > > another *message
> > >> >>> >>> >>> >> >>> > > based inbound queue* based on message header
> > value.
> > >> >>> >>> >>> >> >>> > > 3.From *message based inbound queue *i* *need
> > camel
> > >> >>> >>> >>> >> >>> > > routing to
> > >> >>> >>> >>> move
> > >> >>> >>> >>> >> >>> > message
> > >> >>> >>> >>> >> >>> > > to *one or more outbound queue *based on
> message
> > >> >>> >>> >>> >> >>> > > content*
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > I need *camel java DSL*sample code for above
> > >> >>> >>> >>> >> >>> > > requirement.*
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > > *Thanks in advance*
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2
> > [via
> > >> >>> >>> >>> >> >>> > > Camel]
> > >> >>> >>> >>> >> >>> > > <
> > >> >>> >>> >>> >> >>> > > [hidden email] <
> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>
> > >> >>> >>> >>> >> >>> > wrote:
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >> Hi
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> Do as the exception tells you. Check route 2.
> > You
> > >> >>> >>> >>> >> >>> > >> route
> > >> >>> >>> >>> >> >>> > >> from
> > >> >>> >>> >>> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know
> to
> > >> >>> >>> >>> >> >>> > >> Camel.
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> Maybe you need to add "activemq:" as prefix
> so
> > its
> > >> >>> >>> >>> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden
> email]<
> > >> >>> >>> >>> >> >>> >
> > http://user/SendEmail.jtp?type=node&node=5730109&i=0
> > >> >
> > >> >>> >>> >>> >> >>> > >> <[hidden email] <
> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> > >> >>> >>> >>> >> >>> >>
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > >> wrote:
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I have activemmq  Project in that i have
> > >> following
> > >> >>> >>> >>> requirement
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> 1.Move message from Inbound queue to type
> based
> > >> >>> >>> >>> >> >>> > >>> inbound
> > >> >>> >>> >>> queue.
> > >> >>> >>> >>> >> >>> > >>> 2.Move message from Message type inbound
> queue
> > to
> > >> >>> >>> >>> >> >>> > >>> outbound
> > >> >>> >>> >>> queue
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I have created two bean for to achieve this.
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> 1.one for move from inbound to message type
> > >>  inbound
> > >> >>> >>> >>> >> >>> > >>> queue
> > >> >>> >>> >>> >> >>> > >>> 2.one for move from inbound to outbound
> queue.
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I have following entry in camel.xml
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>   <camelContext id="camel" xmlns="
> > >> >>> >>> >>> >> >>> > http://camel.apache.org/schema/spring">
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>                <routeBuilder
> ref="routeBuilder"
> > >> />
> > >> >>> >>> >>> >> >>> > >>>            <routeBuilder ref="routeBuilder1"
> />
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>    </camelContext>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder"
> > >> >>> >>> >>> >> >>> > >>>
> > class="com.camel.routes.SinglecastRouteBuilder"/>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator"
> > >> >>> >>> >>> >> >>> > >>>
> class="com.camel.routes.TypeSpecificListBean"/>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder1"
> > >> >>> >>> >>> >> >>> > >>>
> > class="com.camel.routes.MulticastRouteBuilder"/>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator1"
> > >> >>> >>> >>> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> When i run application i am getting
> following
> > >> error.
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> * java.lang.Exception:
> > >> >>> >>> >>> org.apache.camel.RuntimeCamelException:
> > >> >>> >>> >>> >> >>> > >>> org.apache.camel.Fa
> > >> >>> >>> >>> >> >>> > >>> iledToCreateRouteException: Failed to create
> > >> route
> > >> >>> >>> >>> >> >>> > >>> route2:
> > >> >>> >>> >>> >> >>> > >>> Route[[From[Inbound.G
> > >> >>> >>> >>> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:...
> > >> because
> > >> >>> >>> >>> >> >>> > >>> of No
> > >> >>> >>> >>> endpoint
> > >> >>> >>> >>> >> >>> > could
> > >> >>> >>> >>> >> >>> > >> be
> > >> >>> >>> >>> >> >>> > >>> found
> > >> >>> >>> >>> >> >>> > >>> for: Inbound.SSS.TestEvent, please check
> your
> > >> >>> >>> >>> >> >>> > >>> classpath
> > >> >>> >>> >>> contains
> > >> >>> >>> >>> >> the
> > >> >>> >>> >>> >> >>> > >> needed
> > >> >>> >>> >>> >> >>> > >>> Cam
> > >> >>> >>> >>> >> >>> > >>> el component jar.*
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I am not sure i am missing any
> > >> configuration,Please
> > >> >>> >>> >>> >> >>> > >>> kindly
> > >> >>> >>> >>> help
> > >> >>> >>> >>> >> me
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> --
> > >> >>> >>> >>> >> >>> > >>> View this message in context:
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> > >> >>> >>> >>> >> >>> > >>> Sent from the Camel - Users mailing list
> > archive
> > >> at
> > >> >>> >>> >>> Nabble.com.
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> --
> > >> >>> >>> >>> >> >>> > >> Claus Ibsen
> > >> >>> >>> >>> >> >>> > >> -----------------
> > >> >>> >>> >>> >> >>> > >> Red Hat, Inc.
> > >> >>> >>> >>> >> >>> > >> FuseSource is now part of Red Hat
> > >> >>> >>> >>> >> >>> > >> Email: [hidden email]<
> > >> >>> >>> >>> >> >>> >
> > http://user/SendEmail.jtp?type=node&node=5730109&i=2
> > >> >
> > >> >>> >>> >>> >> >>> > >> Web: http://fusesource.com
> > >> >>> >>> >>> >> >>> > >> Twitter: davsclaus
> > >> >>> >>> >>> >> >>> > >> Blog: http://davsclaus.com
> > >> >>> >>> >>> >> >>> > >> Author of Camel in Action:
> > >> >>> >>> >>> >> >>> > >> http://www.manning.com/ibsen
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> ------------------------------
> > >> >>> >>> >>> >> >>> > >> If you reply to this email, your message will
> be
> > >> >>> >>> >>> >> >>> > >> added to
> > >> >>> >>> >>> >> >>> > >> the
> > >> >>> >>> >>> >> >>> > discussion
> > >> >>> >>> >>> >> >>> > >> below:
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > >> .
> > >> >>> >>> >>> >> >>> > >> 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
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > --
> > >> >>> >>> >>> >> >>> > > Thanks & Regards
> > >> >>> >>> >>> >> >>> > > Prabu.N
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > --
> > >> >>> >>> >>> >> >>> > > View this message in context:
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > > Sent from the Camel - Users mailing list
> archive
> > at
> > >> >>> >>> >>> Nabble.com.
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > ------------------------------
> > >> >>> >>> >>> >> >>> >  If you reply to this email, your message will
> be
> > >> added
> > >> >>> >>> >>> >> >>> > to
> > >> >>> >>> >>> >> >>> > the
> > >> >>> >>> >>> >> discussion
> > >> >>> >>> >>> >> >>> > below:
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> > >> >>> >>> >>> >> >>> >  To unsubscribe from Camel routing issue, 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
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> --
> > >> >>> >>> >>> >> >>> Thanks & Regards
> > >> >>> >>> >>> >> >>>  Prabu.N
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> --
> > >> >>> >>> >>> >> >>> View this message in context:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> > >> >>> >>> >>> >> >>> Sent from the Camel - Users mailing list archive
> at
> > >> >>> >>> >>> >> >>> Nabble.com.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> --
> > >> >>> >>> >>> >> >> Claus Ibsen
> > >> >>> >>> >>> >> >> -----------------
> > >> >>> >>> >>> >> >> Red Hat, Inc.
> > >> >>> >>> >>> >> >> FuseSource is now part of Red Hat
> > >> >>> >>> >>> >> >> Email: [hidden
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=7>
> > >> >>> >>> >>> >> >> Web: http://fusesource.com
> > >> >>> >>> >>> >> >> Twitter: davsclaus
> > >> >>> >>> >>> >> >> Blog: http://davsclaus.com
> > >> >>> >>> >>> >> >> Author of Camel in Action:
> > http://www.manning.com/ibsen
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > --
> > >> >>> >>> >>> > Claus Ibsen
> > >> >>> >>> >>> > -----------------
> > >> >>> >>> >>> > Red Hat, Inc.
> > >> >>> >>> >>> > FuseSource is now part of Red Hat
> > >> >>> >>> >>> > Email: [hidden
> > >> >>> >>> >>> > email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=8
> > >> >
> > >> >>> >>> >>> > Web: http://fusesource.com
> > >> >>> >>> >>> > Twitter: davsclaus
> > >> >>> >>> >>> > Blog: http://davsclaus.com
> > >> >>> >>> >>> > Author of Camel in Action: http://www.manning.com/ibsen
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>> ------------------------------
> > >> >>> >>> >>>  If you reply to this email, your message will be added
> to
> > the
> > >> >>> >>> >>> discussion below:
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
> > >> >>> >>> >>>  To unsubscribe from Camel routing issue, 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
> > >> >
> > >> >>> >>> >>>
> > >> >>> >>> >>
> > >> >>> >>> >>
> > >> >>> >>> >>
> > >> >>> >>> >> --
> > >> >>> >>> >> Thanks & Regards
> > >> >>> >>> >>  Prabu.N
> > >> >>> >>> >>
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> > --
> > >> >>> >>> > Thanks & Regards
> > >> >>> >>> >  Prabu.N
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> > --
> > >> >>> >>> > View this message in context:
> > >> >>> >>> >
> > >> >>> >>> >
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
> > >> >>> >>> > Sent from the Camel - Users mailing list archive at
> > Nabble.com.
> > >> >>> >>
> > >> >>> >>
> > >> >>> >>
> > >> >>> >>
> > >> >>> >> --
> > >> >>> >> Thanks & Regards
> > >> >>> >>  Prabu.N
> > >> >>> >
> > >> >>> >
> > >> >>> >
> > >> >>> >
> > >> >>> > --
> > >> >>> > Thanks & Regards
> > >> >>> >  Prabu.N
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> Thanks & Regards
> > >> >>  Prabu.N
> > >>
> > >
> > >
> > >
> > > --
> > > Thanks & Regards
> > >  Prabu.N
> > >
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730590.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730662.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730878.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi *Chris / **Claus*,

I have one *Inbound* queue,based on header and content type,I want forward
to outbound queue.
*
Example 1:
*
*
Inbound.queue name : **Inbound.Test.DDD
Outbound.queue name : SOURHQueueName

*
*Criteria or Condition :
*
Message property *PAST_EVENT_INTERVAL type* is : *0*
  *AND*
Message *Type* value is : *card.test *or* card.expiry.test*

*Example 2:*

*Inbound.queue name : **Inbound.Test.SSS
Outbound.queue name : WESTQueueName
*
*Criteria or Condition :*
Message property *PAST_EVENT_INTERVAL type* is : *0*
 *AND
*
Message *Type *value *start with* :*card.event*

I want achieve this using camel routing java DSL.

Please help me.How can i use AND,OR and regular expression in camel routing

*Regards*
Prabu.N


On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
ml-node+s465427n5730166h48@n5.nabble.com> wrote:

> Hi Claus,
>
> Thanks for the response - I could not see any obvious way to configure
> an FTP Consumer at ***runtime***,
> either via bean, processor or consumer template.  If you have a
> concrete example, that would be great to see...
>
> ...otherwise, here's the solution I came up with:
>
>
>     -Chris
>
>
>
>   // simulate incoming message from JMS...
>   from("timer:kickoff?repeatCount=1")
>   .to("direct:start");
>
>   // upon receipt of FTP config from JMS, invoke  FtpConfigurer bean
> to reconfigure
>   // FTP route, then start it...
>   from("direct:start")
>   .beanRef("configRdr") // config reader bean not shown here
>   .convertBodyTo(Document.class)
>   // sets a bunch of headers from DOM, e.g.:
>
> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>
> String.class)
>   .setHeader("ftp-route-id", constant("ftp.route"))
>   .beanRef("ftpConfigurer");
>
>   // FTP route will only be started by FtpConfigurer bean after it's
> dynamically re-configured...
>   from("ftp://bogushost/bogusdir?startScheduler=false") // the  URI
> will be reconfigured...
>   .routeId("ftp.route").noAutoStartup()
>   .log("Received file ${file:onlyname}")
>   .to("file:/tmp/local/data");
>
>   public class FtpConfigurer {
>     public void configureFtpConsumer(Exchange exchange) throws Exception {
>         CamelContext context = exchange.getContext();
>         Map<String, Object> headers = exchange.getIn().getHeaders();
>         Map<String, Object> parameters = new HashMap<String, Object>();
>
>         // Filter headers for ftp-config specific headers...
>         for (Map.Entry<String, Object> entry : headers.entrySet()) {
>             String key = entry.getKey();
>             if (key.startsWith("ftp-config."))
>                 parameters.put(key.substring("ftp-config.".length()),
> entry.getValue());
>         }
>
>         String routeId = exchange.getIn().getHeader("ftp-route-id",
> String.class);
>         Route ftpRoute = context.getRoute(routeId);
>         FtpConsumer c = (FtpConsumer) ftpRoute.getConsumer();
>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>) c.getEndpoint();
>         FtpConfiguration rfc = rfe.getConfiguration();
>
>         // Need to crack open FtpConsumer's "endpointPath" field since
>         // there's no mutator (setter)
>         Class<?> cls = c.getClass();
>         Field endpointPath_fld = cls.getDeclaredField("endpointPath");
>         endpointPath_fld.setAccessible(true);
>         endpointPath_fld.set(c, (String)parameters.get("directory"));
>
>         // Need to crack open FtpEndpoint, actually DefaultEndpoint -
> the ultimate base class
>         // since there's no mutator (setter) for the "endpointUri" field
>         cls = rfe.getClass();
>         Field endpointUri_fld = null;
>         while (endpointUri_fld == null) {
>             // TODO: maybe change logic to just stop at
> class=DefaultEndpoint
>             // rather then using NoSuchFieldException
>             try {
>                 endpointUri_fld = cls.getDeclaredField("endpointUri");
>             } catch (NoSuchFieldException nsfe) {
>                 cls = cls.getSuperclass();
>             }
>         }
>         endpointUri_fld.setAccessible(true);
>         endpointUri_fld.set(rfe,
>             String.format("ftp://%s/%s",
> (String)parameters.get("host"), (String)parameters.get("directory")));
>
>         // set reference properties first as they use # syntax that
> fools the regular properties setter
>         EndpointHelper.setReferenceProperties(context, rfc, parameters);
>         EndpointHelper.setProperties(context, rfc, parameters);
>         EndpointHelper.setReferenceProperties(context, rfe, parameters);
>         EndpointHelper.setProperties(context, rfe, parameters);
>         c.setStartScheduler(true);
>
>         context.startRoute(routeId);
>   }
> }
>
> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=0>>
> wrote:
>
> > Hi
> >
> > See this EIP
> > http://camel.apache.org/content-enricher.html
> >
> > About pollEnrich.
> >
> > Though pollEnrich currently does support dynamic uris. Its on the
> roadmap,
> > for Camel 3.0.
> > It requires an API change and thus isn't so easy to implement currently
> on
> > 2.x.
> >
> > You can always use a java bean / camel processor, and consume the ftp
> file
> > from java code.
> > For example using consumer template.
> >
> > As you use FTP you may want to set disconnect=true so the connect is not
> > remained open after usage.
> >
> >
> >
> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=1>>
> wrote:
> >
> >> Ok, I'm starting to get it - a little bit.  As for my concrete
> >> example, so far, I have:
> >>
> >>                 from("direct:start")
> >>                 .beanRef("config")
> >>                 .convertBodyTo(Document.class)
> >>                 .recipientList().xquery(
> >>                     "concat('ftp://'" +
> >>                     ",//remote[vendorId/@value='CBOE34']/server/@value"
> +
> >>
> >>
> >>
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>
> >> +
> >>                     ",'?noop=true&amp;username='" +
> >>
> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> >>                     ",'&amp;password='" +
> >>
> >> ",//remote[vendorId/@value='CBOE34']/password/@value)", String.class);
> >>
> >> Here's the problem - this will create an FTP Producer - that's not
> >> what I need.  I need a dynamically
> >> constructed URI for a polling FTP consumer.  I don't think
> >> "recipientList" will work...   Any ideas?
> >>
> >> Thanks,
> >>
> >> Chris
> >>
> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
> wrote:
> >> > Hi Claus,
> >> >
> >> > I hate to ask this - but I still don't get it.  I thought
> >> > "recipientList" was for sending to multiple, runtime-defined
> >> > recipients.  I don't see how this
> >> > answers the question of sending to one, single recipient, whose URI
> is
> >> > dynamically constructed - and in my use-case the dynamic settings
> >> > are not in properties - so "simple" (property place-holders) won't
> help
> >> me.
> >> >
> >> > Let me give you a concrete example.  I need to do an ftp download and
> >> > the connection information comes from up-stream in the route in the
> >> > form of XML (DOM - a Document instance).  Currently, I am trying to
> do
> >> > this with bean binding and method params decorated with @XPath
> >> > pointing into the Document with the ftp settings and inside the
> >> > this method doing:
> >> >
> >> > FtpComponent ftpComponent = context.getComponent("ftp",
> >> FtpComponent.class);
> >> >
> >> > ..and then attempt to get the endpoint and call createConsumer(...).
> >> > I'm sure this is not the right way to do it, but I don't see how else
> >> > - any ideas?
> >> >
> >> > Thanks,
> >> >
> >> >
> >> > Chris
> >> >
> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
>
> >> wrote:
> >> >> Hi
> >> >>
> >> >> See this FAQ
> >> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=4>
> >> >> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
>
> >> >>
> >> >>> Thanks Walzer..
> >> >>> *
> >> >>> *
> >> >>> *Queston1:
> >> >>>
> >> >>> *
> >> >>> *Example*
> >> >>>
> >> >>> .when(header("foo").isEqualTo("bar"))
> >> >>>                     .to("direct:b")
> >> >>>
> >> >>> In my case i have to add more than 80 condition and forwards to 80
> >> >>> different queues.
> >> >>>
> >> >>> Above example i can only hard-code queue name,But what i want is
> below.
> >> >>>
> >> >>> * .when(header("Type").isNotNull())
> >> >>>     .to("activemq.Inbound."+header("Type"))
> >> >>> *
> >> >>>
> >> >>> Example:If queue type is test,It should forward to *Inbound.test*
> >> queue.
> >> >>>
> >> >>> Above example i tried,but it did not worked,created queue something
> >> >>> like this *Inbound.header("type")*
> >> >>>
> >> >>> *Question2*:
> >> >>>
> >> >>> from("direct:a")
> >> >>>             .multicast().to("direct:b", "direct:c", "direct:d");
> >> >>>
> >> >>> Based on messages header and content type i want forward to
> different
> >> >>> queue.
> >> >>>
> >> >>> condition will be *OR *and *AND*.How can i do that like above
> example.*
> >> >>> *
> >> >>>
> >> >>> Thanks in advance*
> >> >>> *
> >> >>>
> >> >>> *Regards*
> >> >>>
> >> >>> Prabu.N
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
> >> >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
> wrote:
> >> >>>
> >> >>> > Hi,
> >> >>> >
> >> >>> > you could start by reading Claus´ book (p. 44ff) which has a
> perfect
> >> >>> > example or http://camel.apache.org/content-based-router.html (just
>
> >> >>> > replace the direct: with your queues).
> >> >>> > If you need to fire your messages to multiple queues:
> >> >>> > http://camel.apache.org/publish-subscribe-channel.html shows you
> the
> >> >>> > various ways.
> >> >>> > When you get the concepts you can just "lego" them together.
> >> >>> >
> >> >>> > Regards, Thomas.
> >> >>> >
> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> >> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> >> >>> > <[hidden email] <
> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> >> >>> >
> >> >>> > > Hi Claus,
> >> >>> > >
> >> >>> > > Thanks so much Clus for help.It is working now.
> >> >>> > >
> >> >>> > > I need your guidance for the following requirement.
> >> >>> > >
> >> >>> > > 1.I have one *inbound queue* it will receive message frequently
> >> from my
> >> >>> > > application.
> >> >>> > > 2.From *inbound queue* i need camel routing to move message
> from
> >> >>> > > another *message
> >> >>> > > based inbound queue* based on message header value.
> >> >>> > > 3.From *message based inbound queue *i* *need camel routing to
> move
> >> >>> > message
> >> >>> > > to *one or more outbound queue *based on message content*
> >> >>> > > *
> >> >>> > >
> >> >>> > > I need *camel java DSL*sample code for above requirement.*
> >> >>> > > *
> >> >>> > > *
> >> >>> > > *
> >> >>> > > *Thanks in advance*
> >> >>> > >
> >> >>> > >
> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
> >> >>> > > [hidden email] <
> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> >> >>> > wrote:
> >> >>> > >
> >> >>> > >> Hi
> >> >>> > >>
> >> >>> > >> Do as the exception tells you. Check route 2. You route from
> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
> >> >>> > >>
> >> >>> > >> Maybe you need to add "activemq:" as prefix so its
> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
> >> >>> > >>
> >> >>> > >>
> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> >> >>> > >> <[hidden email] <
> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> >> >>> >>
> >> >>> >
> >> >>> > >> wrote:
> >> >>> > >>
> >> >>> > >>>
> >> >>> > >>> I have activemmq  Project in that i have following
> requirement
> >> >>> > >>>
> >> >>> > >>> 1.Move message from Inbound queue to type based inbound
> queue.
> >> >>> > >>> 2.Move message from Message type inbound queue to outbound
> queue
> >> >>> > >>>
> >> >>> > >>> I have created two bean for to achieve this.
> >> >>> > >>>
> >> >>> > >>> 1.one for move from inbound to message type  inbound queue
> >> >>> > >>> 2.one for move from inbound to outbound queue.
> >> >>> > >>>
> >> >>> > >>> I have following entry in camel.xml
> >> >>> > >>>
> >> >>> > >>>   <camelContext id="camel" xmlns="
> >> >>> > http://camel.apache.org/schema/spring">
> >> >>> > >>
> >> >>> > >>>
> >> >>> > >>>                <routeBuilder ref="routeBuilder" />
> >> >>> > >>>            <routeBuilder ref="routeBuilder1" />
> >> >>> > >>>
> >> >>> > >>>    </camelContext>
> >> >>> > >>>
> >> >>> > >>>    <bean id="routeBuilder"
> >> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> >> >>> > >>>    <bean id="recipientsGenerator"
> >> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> >> >>> > >>>    <bean id="routeBuilder1"
> >> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
> >> >>> > >>>    <bean id="recipientsGenerator1"
> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> >> >>> > >>>
> >> >>> > >>> When i run application i am getting following error.
> >> >>> > >>>
> >> >>> > >>> * java.lang.Exception:
> org.apache.camel.RuntimeCamelException:
> >> >>> > >>> org.apache.camel.Fa
> >> >>> > >>> iledToCreateRouteException: Failed to create route route2:
> >> >>> > >>> Route[[From[Inbound.G
> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No
> endpoint
> >> >>> > could
> >> >>> > >> be
> >> >>> > >>> found
> >> >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath
> contains
> >> the
> >> >>> > >> needed
> >> >>> > >>> Cam
> >> >>> > >>> el component jar.*
> >> >>> > >>>
> >> >>> > >>> I am not sure i am missing any configuration,Please kindly
> help
> >> me
> >> >>> > >>>
> >> >>> > >>>
> >> >>> > >>>
> >> >>> > >>>
> >> >>> > >>> --
> >> >>> > >>> View this message in context:
> >> >>> > >>
> >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> >> >>> > >>> Sent from the Camel - Users mailing list archive at
> Nabble.com.
> >> >>> > >>
> >> >>> > >>
> >> >>> > >>
> >> >>> > >> --
> >> >>> > >> Claus Ibsen
> >> >>> > >> -----------------
> >> >>> > >> Red Hat, Inc.
> >> >>> > >> FuseSource is now part of Red Hat
> >> >>> > >> Email: [hidden email]<
> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> >> >>> > >> Web: http://fusesource.com
> >> >>> > >> Twitter: davsclaus
> >> >>> > >> Blog: http://davsclaus.com
> >> >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
> >> >>> > >>
> >> >>> > >>
> >> >>> > >> ------------------------------
> >> >>> > >> If you reply to this email, your message will be added to the
> >> >>> > discussion
> >> >>> > >> below:
> >> >>> > >>
> >> >>> > >>
> >> >>> >
> >> >>> > >> .
> >> >>> > >> 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
> >> >>> >
> >> >>> >
> >> >>> > >>
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>> > > --
> >> >>> > > Thanks & Regards
> >> >>> > > Prabu.N
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>> > > --
> >> >>> > > View this message in context:
> >> >>> >
> >> >>>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> >> >>> >
> >> >>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >>> >
> >> >>> >
> >> >>> >
> >> >>> > ------------------------------
> >> >>> >  If you reply to this email, your message will be added to the
> >> discussion
> >> >>> > below:
> >> >>> >
> >> >>> >
> >> >>>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> >> >>> >  To unsubscribe from Camel routing issue, 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
> >> >>> >
> >> >>> >
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>> Thanks & Regards
> >> >>>  Prabu.N
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>> View this message in context:
> >> >>>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> >> >>> Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >>>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Claus Ibsen
> >> >> -----------------
> >> >> Red Hat, Inc.
> >> >> FuseSource is now part of Red Hat
> >> >> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=7>
> >> >> Web: http://fusesource.com
> >> >> Twitter: davsclaus
> >> >> Blog: http://davsclaus.com
> >> >> Author of Camel in Action: http://www.manning.com/ibsen
> >>
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=8>
> > Web: http://fusesource.com
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730168.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Please kindly help me..

Regards
Prabu.N


On Mon, Apr 15, 2013 at 1:36 PM, Prabu <pr...@gmail.com> wrote:

> Hi Chris/Claus,
>
> *Question:1*
>
> I am having code like blow.based on condition i want forward into dynamic
> queue.
>
>  .when(header(TYPE).isNotNull())
>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>
> i want to use .to(simple ) insight of .recipientList(simple)
>
> Please suggest is it possible?.why it is not possible is there any
> performance issue if i use .recipientList(simple)
>
> *Question:2*
>
>  I having more than 85 queues.Based on condition i want to forward to
> correct queue.
>
> In my route builder i having code below for all 85 queus.
>
>   from(ALERT_QNAME).choice()
>           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>           .otherwise()
>           .to(ERQ_QNAME)
>  .end();
>
> I feel like because of my code performance getting degrade.Please suggest
> if i am wrong?
>
> When i open jconsole i am getting white screen and queues some time not
> showing any attribute?
>
>
> Please kindly help me.
>
> *Regards*
> Prabu.N
>
>
> On Wed, Apr 10, 2013 at 7:39 PM, Chris Wolf [via Camel] <
> ml-node+s465427n5730662h24@n5.nabble.com> wrote:
>
>> You're asking about a problem with "CARD_EVENT_PREDICATE" without
>> including
>> the definition of that?
>>
>>
>> On Tue, Apr 9, 2013 at 8:31 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=0>
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730662&i=1>>wrote:
>>
>>
>> > Hi Chris,
>> >
>> > from(CARD_TYPE_SPECIFIC_QNAME).choice()
>> > .when(SCHEDULE_PREDICATE).multicast().to(CARD_QNAME,SCHEDULE_QNAME);
>> > .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
>> > .otherwise()
>> > .setHeader(PROPERTY_ORIGINAL_DESTINATION,
>> > constant(PROPERTY_ORIGINAL_DESTINATION_VALUE))
>> > .to(ERQ_QNAME)
>> > .end();
>> >
>> > When i compile above code i am getting followin
>> >
>> > lder.java:115: illegal start of expression
>> >     .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
>> >               ^
>> >
>> > Please kindly help me,i am doing any syntax mistake here
>> >
>> > *Regards*
>> > Prabu.N
>> >
>> >
>> >
>> >
>> >
>> > On Fri, Apr 5, 2013 at 3:58 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=2>>
>> wrote:
>> >
>> > > Thanks Chris/Claus it worked,
>> > >
>> > >
>> > > Hi Chris/Claus,
>> > >
>> > > When running active-mq 5.8 i am getting following issue,do you have
>> any
>> > > idea.
>> > >
>> > > 2013-04-05 05:26:16,312 | WARN  | Async error occurred:
>> > > java.lang.IllegalStateException: Cannot add a consumer to a
>> connection
>> > that
>> > > had not been registered:
>> > >
>> > >
>> > > *Regards*
>> > > Prabu.N
>> > >
>> > >
>> > >
>> > >
>> > > On Thu, Apr 4, 2013 at 6:55 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=3>>
>> wrote:
>> > >
>> > >> 1.) You're NOT using my code - it's still the same as you had before
>> > >> 2.) You're still calling setHeader(java.lang.String,
>> java.lang.String)
>> > >>      even though I tried to tell you that it has to be
>> > >>      setHeader(java.lang.String, org.apache.camel.Expression)
>> > >>
>> > >> On Wed, Apr 3, 2013 at 2:51 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=4>>
>> wrote:
>> > >> > Please kindly help me...
>> > >> >
>> > >> > On Apr 3, 2013 8:54 PM, "Prabu" <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=5>>
>> wrote:
>> > >> >>
>> > >> >> Hi Chris,
>> > >> >>
>> > >> >> I used your code.But i am getting following compilation error
>> > >> >>
>> > >> >> lder.java:92: cannot find symbol
>> > >> >> symbol  : method setHeader(java.lang.String,java.lang.String)
>> > >> >> location: class org.apache.camel.model.ChoiceDefinition
>> > >> >>                   .otherwise().setHeader("MyHeader","sdfsdf")
>> > >> >>
>> > >> >>
>> > >> >> Note: I am using camel 2.10 version
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >> On Wed, Apr 3, 2013 at 8:22 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=6>>
>>
>> > >> wrote:
>> > >> >>>
>> > >> >>> Hi Prabu,
>> > >> >>>
>> > >> >>> I don't mind helping, but could you continue to use the
>> > >> >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=7>rather then my private email?  That way, if
>> > >> >>> other people have similar issues, they can benefit.
>> > >> >>>
>> > >> >>>
>> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
>> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> > >> >>>            .otherwise()
>> > >> >>>            .setHeader("MyHeader", constant("some-value"))  //
>> <===
>> > Set
>> > >> >>> Header
>> > >> >>>            .to(ERQ_QNAME)
>> > >> >>>    .end();
>> > >> >>>
>> > >> >>> This technique will use the "simple" language function
>> "constant" to
>> > >> >>> set a string constant value.
>> > >> >>> If the value you need to set is dynamic, then you could use a
>> > >> >>> property placeholder.
>> > >> >>>
>> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
>> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> > >> >>>            .otherwise()
>> > >> >>>            .setHeader("MyHeader", constant("{{some-prop}}"))  //
>> > <===
>> > >> Set
>> > >> >>> Header
>> > >> >>>            .to(ERQ_QNAME)
>> > >> >>>    .end();
>> > >> >>>
>> > >> >>> There are even more sophisticated ways to acquire dynamic
>> values:
>> > >> >>>
>> > >> >>> http://camel.apache.org/python.html
>> > >> >>>
>> > >> >>> Regards,
>> > >> >>>
>> > >> >>> Chris
>> > >> >>>
>> > >> >>> On Wed, Apr 3, 2013 at 9:52 AM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=8>>
>> wrote:
>> > >> >>> > I have code like this,
>> > >> >>> >
>> > >> >>> >     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice()
>> > >> >>> >
>> .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> > >> >>> >           .otherwise().to(ERQ_QNAME)
>> > >> >>> >    .end();
>> > >> >>> >
>> > >> >>> >     from(DEACTIVATIN_TYPE_SPECIFIC_QNAME).choice()
>> > >> >>> >
>> > >> >>> > .when(ALERT_FAILURE_HANDLER_PREDICATE).to(ALERT_FAILURE_QNAME)
>> > >> >>> >           .otherwise().to(ERQ_QNAME)
>> > >> >>> >     .end();
>> > >> >>> >
>> > >> >>> > I want to set some values to header inside otherwise that is
>> > before
>> > >> >>> > message
>> > >> >>> > move to ERQ_QNAME.
>> > >> >>> >
>> > >> >>> > please kindly help me how to do that.
>> > >> >>> >
>> > >> >>> > Regards
>> > >> >>> > Prabu.N
>> > >> >>> >
>> > >> >>> >
>> > >> >>> > On Tue, Apr 2, 2013 at 10:52 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=9>>
>>
>> > >> wrote:
>> > >> >>> >>
>> > >> >>> >> No,i didn't received ...
>> > >> >>> >>
>> > >> >>> >> Regards
>> > >> >>> >> Prabu.N
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >> On Tue, Apr 2, 2013 at 7:31 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=10>
>> > >
>> > >> >>> >> wrote:
>> > >> >>> >>>
>> > >> >>> >>> Hi Prabu,
>> > >> >>> >>>
>> > >> >>> >>> Just out of curiosity - I am wondering if saw my email I
>> sent
>> > >> >>> >>> yesterday in response to your question?
>> > >> >>> >>> I sent it to "[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=11>"
>> with the subject,
>> > >> >>> >>> "Content-based routing with Expressions and Predicates"...
>> > >> >>> >>>
>> > >> >>> >>> Regards,
>> > >> >>> >>>
>> > >> >>> >>> Chris
>> > >> >>> >>>
>> > >> >>> >>> On Tue, Apr 2, 2013 at 4:17 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=12>
>> > >> >>> >>> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=13>>
>> wrote:
>> > >> >>> >>> > I have found solution in internet using Predicate  we can
>> > >> achieve
>> > >> >>> >>> > this,
>> > >> >>> >>> >
>> > >> >>> >>> > But,one doubt in the link
>> > >> >>> >>> > http://camel.apache.org/predicate.html,Theymentioned that
>> we
>> > >> can
>> > >> >>> >>> > use
>> > >> >>> >>> > AND and OR in Predicate
>> > >> >>> >>> >
>> > >> >>> >>> > I have added below code in project,But i am getting
>> > compilation
>> > >> >>> >>> > error.Please kindly help
>> > >> >>> >>> >
>> > >> >>> >>> > *Predicate god = and(admin, or(body().contains("Camel
>> Rider"),
>> > >> >>> >>> > header("type").isEqualTo("god")));*
>> > >> >>> >>> >
>> > >> >>> >>> > *Thanks*
>> > >> >>> >>> > Prabu.N
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=14>>
>>
>> > >> wrote:
>> > >> >>> >>> >
>> > >> >>> >>> >> Hi *Chris / **Claus*,
>> > >> >>> >>> >>
>> > >> >>> >>> >> I have one *Inbound* queue,based on header and content
>> type,I
>> > >> want
>> > >> >>> >>> >> forward to outbound queue.
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Example 1:
>> > >> >>> >>> >> *
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Inbound.queue name : **Inbound.Test.DDD
>> > >> >>> >>> >> Outbound.queue name : SOURHQueueName
>> > >> >>> >>> >>
>> > >> >>> >>> >> *
>> > >> >>> >>> >> *Criteria or Condition :
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
>> > >> >>> >>> >>    *AND*
>> > >> >>> >>> >> Message *Type* value is : *card.test *or*
>> card.expiry.test*
>> > >> >>> >>> >>
>> > >> >>> >>> >> *Example 2:*
>> > >> >>> >>> >>
>> > >> >>> >>> >> *Inbound.queue name : **Inbound.Test.SSS
>> > >> >>> >>> >> Outbound.queue name : WESTQueueName
>> > >> >>> >>> >> *
>> > >> >>> >>> >> *Criteria or Condition :*
>> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
>> > >> >>> >>> >>  *AND
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Message *Type *value *start with* :*card.event*
>> > >> >>> >>> >>
>> > >> >>> >>> >> I want achieve this using camel routing java DSL.
>> > >> >>> >>> >>
>> > >> >>> >>> >> Please help me.How can i use AND,OR and regular
>> expression in
>> > >> >>> >>> >> camel
>> > >> >>> >>> >> routing
>> > >> >>> >>> >>
>> > >> >>> >>> >> *Regards*
>> > >> >>> >>> >> Prabu.N
>> > >> >>> >>> >>
>> > >> >>> >>> >>
>> > >> >>> >>> >> On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
>> > >> >>> >>> >> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=15>>
>> wrote:
>> > >> >>> >>> >>
>> > >> >>> >>> >>> Hi Claus,
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> Thanks for the response - I could not see any obvious
>> way to
>> > >> >>> >>> >>> configure
>> > >> >>> >>> >>> an FTP Consumer at ***runtime***,
>> > >> >>> >>> >>> either via bean, processor or consumer template.  If you
>> > have
>> > >> a
>> > >> >>> >>> >>> concrete example, that would be great to see...
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> ...otherwise, here's the solution I came up with:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>     -Chris
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   // simulate incoming message from JMS...
>> > >> >>> >>> >>>   from("timer:kickoff?repeatCount=1")
>> > >> >>> >>> >>>   .to("direct:start");
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   // upon receipt of FTP config from JMS, invoke
>> > >>  FtpConfigurer
>> > >> >>> >>> >>> bean
>> > >> >>> >>> >>> to reconfigure
>> > >> >>> >>> >>>   // FTP route, then start it...
>> > >> >>> >>> >>>   from("direct:start")
>> > >> >>> >>> >>>   .beanRef("configRdr") // config reader bean not shown
>> here
>> > >> >>> >>> >>>   .convertBodyTo(Document.class)
>> > >> >>> >>> >>>   // sets a bunch of headers from DOM, e.g.:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> String.class)
>> > >> >>> >>> >>>   .setHeader("ftp-route-id", constant("ftp.route"))
>> > >> >>> >>> >>>   .beanRef("ftpConfigurer");
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   // FTP route will only be started by FtpConfigurer
>> bean
>> > >> after
>> > >> >>> >>> >>> it's
>> > >> >>> >>> >>> dynamically re-configured...
>> > >> >>> >>> >>>   from("ftp://bogushost/bogusdir?startScheduler=false")
>> //
>> > >> the
>> > >> >>> >>> >>> URI
>> > >> >>> >>> >>> will be reconfigured...
>> > >> >>> >>> >>>   .routeId("ftp.route").noAutoStartup()
>> > >> >>> >>> >>>   .log("Received file ${file:onlyname}")
>> > >> >>> >>> >>>   .to("file:/tmp/local/data");
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   public class FtpConfigurer {
>> > >> >>> >>> >>>     public void configureFtpConsumer(Exchange exchange)
>> > throws
>> > >> >>> >>> >>> Exception
>> > >> >>> >>> >>> {
>> > >> >>> >>> >>>         CamelContext context = exchange.getContext();
>> > >> >>> >>> >>>         Map<String, Object> headers =
>> > >> >>> >>> >>> exchange.getIn().getHeaders();
>> > >> >>> >>> >>>         Map<String, Object> parameters = new
>> HashMap<String,
>> > >> >>> >>> >>> Object>();
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // Filter headers for ftp-config specific
>> headers...
>> > >> >>> >>> >>>         for (Map.Entry<String, Object> entry :
>> > >> >>> >>> >>> headers.entrySet()) {
>> > >> >>> >>> >>>             String key = entry.getKey();
>> > >> >>> >>> >>>             if (key.startsWith("ftp-config."))
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> parameters.put(key.substring("ftp-config.".length()),
>> > >> >>> >>> >>> entry.getValue());
>> > >> >>> >>> >>>         }
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         String routeId =
>> > >> >>> >>> >>> exchange.getIn().getHeader("ftp-route-id",
>> > >> >>> >>> >>> String.class);
>> > >> >>> >>> >>>         Route ftpRoute = context.getRoute(routeId);
>> > >> >>> >>> >>>         FtpConsumer c = (FtpConsumer)
>> > ftpRoute.getConsumer();
>> > >> >>> >>> >>>         FtpEndpoint<FTPFile> rfe =
>> (FtpEndpoint<FTPFile>)
>> > >> >>> >>> >>> c.getEndpoint();
>> > >> >>> >>> >>>         FtpConfiguration rfc = rfe.getConfiguration();
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // Need to crack open FtpConsumer's
>> "endpointPath"
>> > >> field
>> > >> >>> >>> >>> since
>> > >> >>> >>> >>>         // there's no mutator (setter)
>> > >> >>> >>> >>>         Class<?> cls = c.getClass();
>> > >> >>> >>> >>>         Field endpointPath_fld =
>> > >> >>> >>> >>> cls.getDeclaredField("endpointPath");
>> > >> >>> >>> >>>         endpointPath_fld.setAccessible(true);
>> > >> >>> >>> >>>         endpointPath_fld.set(c,
>> > >> >>> >>> >>> (String)parameters.get("directory"));
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // Need to crack open FtpEndpoint, actually
>> > >> >>> >>> >>> DefaultEndpoint -
>> > >> >>> >>> >>> the ultimate base class
>> > >> >>> >>> >>>         // since there's no mutator (setter) for the
>> > >> >>> >>> >>> "endpointUri"
>> > >> >>> >>> >>> field
>> > >> >>> >>> >>>         cls = rfe.getClass();
>> > >> >>> >>> >>>         Field endpointUri_fld = null;
>> > >> >>> >>> >>>         while (endpointUri_fld == null) {
>> > >> >>> >>> >>>             // TODO: maybe change logic to just stop at
>> > >> >>> >>> >>> class=DefaultEndpoint
>> > >> >>> >>> >>>             // rather then using NoSuchFieldException
>> > >> >>> >>> >>>             try {
>> > >> >>> >>> >>>                 endpointUri_fld =
>> > >> >>> >>> >>> cls.getDeclaredField("endpointUri");
>> > >> >>> >>> >>>             } catch (NoSuchFieldException nsfe) {
>> > >> >>> >>> >>>                 cls = cls.getSuperclass();
>> > >> >>> >>> >>>             }
>> > >> >>> >>> >>>         }
>> > >> >>> >>> >>>         endpointUri_fld.setAccessible(true);
>> > >> >>> >>> >>>         endpointUri_fld.set(rfe,
>> > >> >>> >>> >>>             String.format("ftp://%s/%s",
>> > >> >>> >>> >>> (String)parameters.get("host"),
>> > >> >>> >>> >>> (String)parameters.get("directory")));
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // set reference properties first as they use #
>> > syntax
>> > >> >>> >>> >>> that
>> > >> >>> >>> >>> fools the regular properties setter
>> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
>> rfc,
>> > >> >>> >>> >>> parameters);
>> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfc,
>> > >> parameters);
>> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
>> rfe,
>> > >> >>> >>> >>> parameters);
>> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfe,
>> > >> parameters);
>> > >> >>> >>> >>>         c.setStartScheduler(true);
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         context.startRoute(routeId);
>> > >> >>> >>> >>>   }
>> > >> >>> >>> >>> }
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden
>> > >> >>> >>> >>> email]<
>> http://user/SendEmail.jtp?type=node&node=5730166&i=0
>> > >>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> > Hi
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > See this EIP
>> > >> >>> >>> >>> > http://camel.apache.org/content-enricher.html
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > About pollEnrich.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > Though pollEnrich currently does support dynamic uris.
>> Its
>> > >> on
>> > >> >>> >>> >>> > the
>> > >> >>> >>> >>> roadmap,
>> > >> >>> >>> >>> > for Camel 3.0.
>> > >> >>> >>> >>> > It requires an API change and thus isn't so easy to
>> > >> implement
>> > >> >>> >>> >>> > currently
>> > >> >>> >>> >>> on
>> > >> >>> >>> >>> > 2.x.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > You can always use a java bean / camel processor, and
>> > >> consume
>> > >> >>> >>> >>> > the
>> > >> >>> >>> >>> > ftp
>> > >> >>> >>> >>> file
>> > >> >>> >>> >>> > from java code.
>> > >> >>> >>> >>> > For example using consumer template.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > As you use FTP you may want to set disconnect=true so
>> the
>> > >> >>> >>> >>> > connect
>> > >> >>> >>> >>> > is
>> > >> >>> >>> >>> not
>> > >> >>> >>> >>> > remained open after usage.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden
>> > >> >>> >>> >>> > email]<
>> > http://user/SendEmail.jtp?type=node&node=5730166&i=1
>> > >> >>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >> Ok, I'm starting to get it - a little bit.  As for my
>> > >> concrete
>> > >> >>> >>> >>> >> example, so far, I have:
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>                 from("direct:start")
>> > >> >>> >>> >>> >>                 .beanRef("config")
>> > >> >>> >>> >>> >>                 .convertBodyTo(Document.class)
>> > >> >>> >>> >>> >>                 .recipientList().xquery(
>> > >> >>> >>> >>> >>                     "concat('ftp://'" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/server/@value" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> +
>> > >> >>> >>> >>> >>                     ",'?noop=true&amp;username='" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
>> > >> >>> >>> >>> >>                     ",'&amp;password='" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> ",//remote[vendorId/@value='CBOE34']/password/@value)",
>> > >> >>> >>> >>> >> String.class);
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> Here's the problem - this will create an FTP Producer
>> -
>> > >> that's
>> > >> >>> >>> >>> >> not
>> > >> >>> >>> >>> >> what I need.  I need a dynamically
>> > >> >>> >>> >>> >> constructed URI for a polling FTP consumer.  I don't
>> > think
>> > >> >>> >>> >>> >> "recipientList" will work...   Any ideas?
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> Thanks,
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> Chris
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden
>> > >> >>> >>> >>> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>> >> > Hi Claus,
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > I hate to ask this - but I still don't get it.  I
>> > thought
>> > >> >>> >>> >>> >> > "recipientList" was for sending to multiple,
>> > >> runtime-defined
>> > >> >>> >>> >>> >> > recipients.  I don't see how this
>> > >> >>> >>> >>> >> > answers the question of sending to one, single
>> > recipient,
>> > >> >>> >>> >>> >> > whose
>> > >> >>> >>> >>> >> > URI
>> > >> >>> >>> >>> is
>> > >> >>> >>> >>> >> > dynamically constructed - and in my use-case the
>> > dynamic
>> > >> >>> >>> >>> >> > settings
>> > >> >>> >>> >>> >> > are not in properties - so "simple" (property
>> > >> place-holders)
>> > >> >>> >>> >>> >> > won't
>> > >> >>> >>> >>> help
>> > >> >>> >>> >>> >> me.
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > Let me give you a concrete example.  I need to do
>> an
>> > ftp
>> > >> >>> >>> >>> >> > download
>> > >> >>> >>> >>> and
>> > >> >>> >>> >>> >> > the connection information comes from up-stream in
>> the
>> > >> route
>> > >> >>> >>> >>> >> > in
>> > >> >>> >>> >>> >> > the
>> > >> >>> >>> >>> >> > form of XML (DOM - a Document instance).
>>  Currently, I
>> > am
>> > >> >>> >>> >>> >> > trying
>> > >> >>> >>> >>> >> > to
>> > >> >>> >>> >>> do
>> > >> >>> >>> >>> >> > this with bean binding and method params decorated
>> with
>> > >> >>> >>> >>> >> > @XPath
>> > >> >>> >>> >>> >> > pointing into the Document with the ftp settings
>> and
>> > >> inside
>> > >> >>> >>> >>> >> > the
>> > >> >>> >>> >>> >> > this method doing:
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > FtpComponent ftpComponent =
>> context.getComponent("ftp",
>> > >> >>> >>> >>> >> FtpComponent.class);
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > ..and then attempt to get the endpoint and call
>> > >> >>> >>> >>> >> > createConsumer(...).
>> > >> >>> >>> >>> >> > I'm sure this is not the right way to do it, but I
>> > don't
>> > >> see
>> > >> >>> >>> >>> >> > how
>> > >> >>> >>> >>> else
>> > >> >>> >>> >>> >> > - any ideas?
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > Thanks,
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > Chris
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen
>> <[hidden
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> wrote:
>> > >> >>> >>> >>> >> >> Hi
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> See this FAQ
>> > >> >>> >>> >>> >> >>
>> > >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=4>
>> > >> >>> >>> >>> >> >> <[hidden
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>> Thanks Walzer..
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>> *Queston1:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>> *Example*
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> .when(header("foo").isEqualTo("bar"))
>> > >> >>> >>> >>> >> >>>                     .to("direct:b")
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> In my case i have to add more than 80 condition
>> and
>> > >> >>> >>> >>> >> >>> forwards
>> > >> >>> >>> >>> >> >>> to 80
>> > >> >>> >>> >>> >> >>> different queues.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Above example i can only hard-code queue name,But
>> > what
>> > >> i
>> > >> >>> >>> >>> >> >>> want
>> > >> >>> >>> >>> >> >>> is
>> > >> >>> >>> >>> below.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> * .when(header("Type").isNotNull())
>> > >> >>> >>> >>> >> >>>     .to("activemq.Inbound."+header("Type"))
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Example:If queue type is test,It should forward
>> to
>> > >> >>> >>> >>> >> >>> *Inbound.test*
>> > >> >>> >>> >>> >> queue.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Above example i tried,but it did not
>> worked,created
>> > >> queue
>> > >> >>> >>> >>> something
>> > >> >>> >>> >>> >> >>> like this *Inbound.header("type")*
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> *Question2*:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> from("direct:a")
>> > >> >>> >>> >>> >> >>>             .multicast().to("direct:b",
>> "direct:c",
>> > >> >>> >>> >>> >> >>> "direct:d");
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Based on messages header and content type i want
>> > >> forward
>> > >> >>> >>> >>> >> >>> to
>> > >> >>> >>> >>> different
>> > >> >>> >>> >>> >> >>> queue.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> condition will be *OR *and *AND*.How can i do
>> that
>> > like
>> > >> >>> >>> >>> >> >>> above
>> > >> >>> >>> >>> example.*
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Thanks in advance*
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> *Regards*
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Prabu.N
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas
>> [via
>> > >> >>> >>> >>> >> >>> Camel] <
>> > >> >>> >>> >>> >> >>> [hidden
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> > Hi,
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > you could start by reading Claus´ book (p.
>> 44ff)
>> > >> which
>> > >> >>> >>> >>> >> >>> > has a
>> > >> >>> >>> >>> perfect
>> > >> >>> >>> >>> >> >>> > example or
>> > >> >>> >>> >>> >> >>> >
>> http://camel.apache.org/content-based-router.html
>> > >> >>> >>> >>> >> >>> > (just
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> >>> > replace the direct: with your queues).
>> > >> >>> >>> >>> >> >>> > If you need to fire your messages to multiple
>> > queues:
>> > >> >>> >>> >>> >> >>> >
>> > >> http://camel.apache.org/publish-subscribe-channel.html
>> > >> >>> >>> >>> >> >>> > shows
>> > >> >>> >>> >>> you the
>> > >> >>> >>> >>> >> >>> > various ways.
>> > >> >>> >>> >>> >> >>> > When you get the concepts you can just "lego"
>> them
>> > >> >>> >>> >>> >> >>> > together.
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > Regards, Thomas.
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>> > >> >>> >>> >>> >> >>>
>> http://user/SendEmail.jtp?type=node&node=5730116&i=0
>> > >"
>> > >> >>> >>> >>> >> >>> > <[hidden email] <
>> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>>
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > > Hi Claus,
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > Thanks so much Clus for help.It is working
>> now.
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > I need your guidance for the following
>> > requirement.
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > 1.I have one *inbound queue* it will receive
>> > >> message
>> > >> >>> >>> >>> frequently
>> > >> >>> >>> >>> >> from my
>> > >> >>> >>> >>> >> >>> > > application.
>> > >> >>> >>> >>> >> >>> > > 2.From *inbound queue* i need camel routing
>> to
>> > move
>> > >> >>> >>> >>> >> >>> > > message
>> > >> >>> >>> >>> from
>> > >> >>> >>> >>> >> >>> > > another *message
>> > >> >>> >>> >>> >> >>> > > based inbound queue* based on message header
>> > value.
>> > >> >>> >>> >>> >> >>> > > 3.From *message based inbound queue *i* *need
>> > camel
>> > >> >>> >>> >>> >> >>> > > routing to
>> > >> >>> >>> >>> move
>> > >> >>> >>> >>> >> >>> > message
>> > >> >>> >>> >>> >> >>> > > to *one or more outbound queue *based on
>> message
>> > >> >>> >>> >>> >> >>> > > content*
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > I need *camel java DSL*sample code for above
>> > >> >>> >>> >>> >> >>> > > requirement.*
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > > *Thanks in advance*
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus
>> Ibsen-2
>> > [via
>> > >> >>> >>> >>> >> >>> > > Camel]
>> > >> >>> >>> >>> >> >>> > > <
>> > >> >>> >>> >>> >> >>> > > [hidden email] <
>> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>>
>> > >> >>> >>> >>> >> >>> > wrote:
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >> Hi
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> Do as the exception tells you. Check route
>> 2.
>> > You
>> > >> >>> >>> >>> >> >>> > >> route
>> > >> >>> >>> >>> >> >>> > >> from
>> > >> >>> >>> >>> >> >>> > >> "Inbound.SSS.TestEvent". And that is now
>> know to
>> > >> >>> >>> >>> >> >>> > >> Camel.
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> Maybe you need to add "activemq:" as prefix
>> so
>> > its
>> > >> >>> >>> >>> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden
>> email]<
>> > >> >>> >>> >>> >> >>> >
>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0
>> > >> >
>> > >> >>> >>> >>> >> >>> > >> <[hidden email] <
>> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
>> > >> >>> >>> >>> >> >>> >>
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > >> wrote:
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I have activemmq  Project in that i have
>> > >> following
>> > >> >>> >>> >>> requirement
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> 1.Move message from Inbound queue to type
>> based
>> > >> >>> >>> >>> >> >>> > >>> inbound
>> > >> >>> >>> >>> queue.
>> > >> >>> >>> >>> >> >>> > >>> 2.Move message from Message type inbound
>> queue
>> > to
>> > >> >>> >>> >>> >> >>> > >>> outbound
>> > >> >>> >>> >>> queue
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I have created two bean for to achieve
>> this.
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> 1.one for move from inbound to message type
>> > >>  inbound
>> > >> >>> >>> >>> >> >>> > >>> queue
>> > >> >>> >>> >>> >> >>> > >>> 2.one for move from inbound to outbound
>> queue.
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I have following entry in camel.xml
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>   <camelContext id="camel" xmlns="
>> > >> >>> >>> >>> >> >>> > http://camel.apache.org/schema/spring">
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>                <routeBuilder
>> ref="routeBuilder"
>> > >> />
>> > >> >>> >>> >>> >> >>> > >>>            <routeBuilder
>> ref="routeBuilder1" />
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>    </camelContext>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder"
>> > >> >>> >>> >>> >> >>> > >>>
>> > class="com.camel.routes.SinglecastRouteBuilder"/>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator"
>> > >> >>> >>> >>> >> >>> > >>>
>> class="com.camel.routes.TypeSpecificListBean"/>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder1"
>> > >> >>> >>> >>> >> >>> > >>>
>> > class="com.camel.routes.MulticastRouteBuilder"/>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator1"
>> > >> >>> >>> >>> >> >>> > >>>
>> class="com.camel.routes.RecipientListBean"/>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> When i run application i am getting
>> following
>> > >> error.
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> * java.lang.Exception:
>> > >> >>> >>> >>> org.apache.camel.RuntimeCamelException:
>> > >> >>> >>> >>> >> >>> > >>> org.apache.camel.Fa
>> > >> >>> >>> >>> >> >>> > >>> iledToCreateRouteException: Failed to
>> create
>> > >> route
>> > >> >>> >>> >>> >> >>> > >>> route2:
>> > >> >>> >>> >>> >> >>> > >>> Route[[From[Inbound.G
>> > >> >>> >>> >>> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:...
>> > >> because
>> > >> >>> >>> >>> >> >>> > >>> of No
>> > >> >>> >>> >>> endpoint
>> > >> >>> >>> >>> >> >>> > could
>> > >> >>> >>> >>> >> >>> > >> be
>> > >> >>> >>> >>> >> >>> > >>> found
>> > >> >>> >>> >>> >> >>> > >>> for: Inbound.SSS.TestEvent, please check
>> your
>> > >> >>> >>> >>> >> >>> > >>> classpath
>> > >> >>> >>> >>> contains
>> > >> >>> >>> >>> >> the
>> > >> >>> >>> >>> >> >>> > >> needed
>> > >> >>> >>> >>> >> >>> > >>> Cam
>> > >> >>> >>> >>> >> >>> > >>> el component jar.*
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I am not sure i am missing any
>> > >> configuration,Please
>> > >> >>> >>> >>> >> >>> > >>> kindly
>> > >> >>> >>> >>> help
>> > >> >>> >>> >>> >> me
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> --
>> > >> >>> >>> >>> >> >>> > >>> View this message in context:
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>> > >> >>> >>> >>> >> >>> > >>> Sent from the Camel - Users mailing list
>> > archive
>> > >> at
>> > >> >>> >>> >>> Nabble.com.
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> --
>> > >> >>> >>> >>> >> >>> > >> Claus Ibsen
>> > >> >>> >>> >>> >> >>> > >> -----------------
>> > >> >>> >>> >>> >> >>> > >> Red Hat, Inc.
>> > >> >>> >>> >>> >> >>> > >> FuseSource is now part of Red Hat
>> > >> >>> >>> >>> >> >>> > >> Email: [hidden email]<
>> > >> >>> >>> >>> >> >>> >
>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2
>> > >> >
>> > >> >>> >>> >>> >> >>> > >> Web: http://fusesource.com
>> > >> >>> >>> >>> >> >>> > >> Twitter: davsclaus
>> > >> >>> >>> >>> >> >>> > >> Blog: http://davsclaus.com
>> > >> >>> >>> >>> >> >>> > >> Author of Camel in Action:
>> > >> >>> >>> >>> >> >>> > >> http://www.manning.com/ibsen
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> ------------------------------
>> > >> >>> >>> >>> >> >>> > >> If you reply to this email, your message
>> will be
>> > >> >>> >>> >>> >> >>> > >> added to
>> > >> >>> >>> >>> >> >>> > >> the
>> > >> >>> >>> >>> >> >>> > discussion
>> > >> >>> >>> >>> >> >>> > >> below:
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > >> .
>> > >> >>> >>> >>> >> >>> > >> 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
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > --
>> > >> >>> >>> >>> >> >>> > > Thanks & Regards
>> > >> >>> >>> >>> >> >>> > > Prabu.N
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > --
>> > >> >>> >>> >>> >> >>> > > View this message in context:
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > > Sent from the Camel - Users mailing list
>> archive
>> > at
>> > >> >>> >>> >>> Nabble.com.
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > ------------------------------
>> > >> >>> >>> >>> >> >>> >  If you reply to this email, your message will
>> be
>> > >> added
>> > >> >>> >>> >>> >> >>> > to
>> > >> >>> >>> >>> >> >>> > the
>> > >> >>> >>> >>> >> discussion
>> > >> >>> >>> >>> >> >>> > below:
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>> > >> >>> >>> >>> >> >>> >  To unsubscribe from Camel routing issue, 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
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> --
>> > >> >>> >>> >>> >> >>> Thanks & Regards
>> > >> >>> >>> >>> >> >>>  Prabu.N
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> --
>> > >> >>> >>> >>> >> >>> View this message in context:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>> > >> >>> >>> >>> >> >>> Sent from the Camel - Users mailing list archive
>> at
>> > >> >>> >>> >>> >> >>> Nabble.com.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> --
>> > >> >>> >>> >>> >> >> Claus Ibsen
>> > >> >>> >>> >>> >> >> -----------------
>> > >> >>> >>> >>> >> >> Red Hat, Inc.
>> > >> >>> >>> >>> >> >> FuseSource is now part of Red Hat
>> > >> >>> >>> >>> >> >> Email: [hidden
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=7>
>> > >> >>> >>> >>> >> >> Web: http://fusesource.com
>> > >> >>> >>> >>> >> >> Twitter: davsclaus
>> > >> >>> >>> >>> >> >> Blog: http://davsclaus.com
>> > >> >>> >>> >>> >> >> Author of Camel in Action:
>> > http://www.manning.com/ibsen
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > --
>> > >> >>> >>> >>> > Claus Ibsen
>> > >> >>> >>> >>> > -----------------
>> > >> >>> >>> >>> > Red Hat, Inc.
>> > >> >>> >>> >>> > FuseSource is now part of Red Hat
>> > >> >>> >>> >>> > Email: [hidden
>> > >> >>> >>> >>> > email]<
>> > http://user/SendEmail.jtp?type=node&node=5730166&i=8
>> > >> >
>> > >> >>> >>> >>> > Web: http://fusesource.com
>> > >> >>> >>> >>> > Twitter: davsclaus
>> > >> >>> >>> >>> > Blog: http://davsclaus.com
>> > >> >>> >>> >>> > Author of Camel in Action:
>> http://www.manning.com/ibsen
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> ------------------------------
>> > >> >>> >>> >>>  If you reply to this email, your message will be added
>> to
>> > the
>> > >> >>> >>> >>> discussion below:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
>> > >> >>> >>> >>>  To unsubscribe from Camel routing issue, 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
>> > >> >
>> > >> >>> >>> >>>
>> > >> >>> >>> >>
>> > >> >>> >>> >>
>> > >> >>> >>> >>
>> > >> >>> >>> >> --
>> > >> >>> >>> >> Thanks & Regards
>> > >> >>> >>> >>  Prabu.N
>> > >> >>> >>> >>
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> > --
>> > >> >>> >>> > Thanks & Regards
>> > >> >>> >>> >  Prabu.N
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> > --
>> > >> >>> >>> > View this message in context:
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
>> > >> >>> >>> > Sent from the Camel - Users mailing list archive at
>> > Nabble.com.
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >> --
>> > >> >>> >> Thanks & Regards
>> > >> >>> >>  Prabu.N
>> > >> >>> >
>> > >> >>> >
>> > >> >>> >
>> > >> >>> >
>> > >> >>> > --
>> > >> >>> > Thanks & Regards
>> > >> >>> >  Prabu.N
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >> --
>> > >> >> Thanks & Regards
>> > >> >>  Prabu.N
>> > >>
>> > >
>> > >
>> > >
>> > > --
>> > > Thanks & Regards
>> > >  Prabu.N
>> > >
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> >  Prabu.N
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730590.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730662.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730915.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Thank you Claus..


*Regards*
Prabu.N


On Tue, Apr 2, 2013 at 2:12 PM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5730197h9@n5.nabble.com> wrote:

> Yeah or jus static import those methods to make it easier to read
>
> import static org.apache.camel.builder.PredicateBuilder.and;
> import static org.apache.camel.builder.PredicateBuilder.or;
>
>
>
> On Tue, Apr 2, 2013 at 10:38 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730197&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730197&i=1>>wrote:
>
>
> > So can i use like this..
> >
> > Predicate god =
> > PredicateBuilder.and(admin,PredicateBuilder.or(body().contains("Camel
> > Rider"), header("type").isEqualTo("god")));
> >
> >
> > On Tue, Apr 2, 2013 at 2:05 PM, Claus Ibsen-2 [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5730197&i=2>>
> wrote:
> >
> > > Hi
> > >
> > > You should static import those methods: and, or
> > > on the class org.apache.camel.builder.PredicateBuilder
> > >
> > >
> >
> http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/builder/PredicateBuilder.html
> > >
> > >
> > >
> > > On Tue, Apr 2, 2013 at 10:17 AM, [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730195&i=0>
> > > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730195&i=1
>
> > >>wrote:
> > >
> > >
> > > > I have found solution in internet using Predicate  we can achieve
> this,
> > > >
> > > > But,one doubt in the link
> > > > http://camel.apache.org/predicate.html,Theymentioned that we can
> use
> > > > AND and OR in Predicate
> > > >
> > > > I have added below code in project,But i am getting compilation
> > > > error.Please kindly help
> > > >
> > > > *Predicate god = and(admin, or(body().contains("Camel Rider"),
> > > > header("type").isEqualTo("god")));*
> > > >
> > > > *Thanks*
> > > > Prabu.N
> > > >
> > > >
> > > > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <[hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730195&i=2>>
> > > wrote:
> > > >
> > > > > Hi *Chris / **Claus*,
> > > > >
> > > > > I have one *Inbound* queue,based on header and content type,I want
> > > > > forward to outbound queue.
> > > > > *
> > > > > Example 1:
> > > > > *
> > > > > *
> > > > > Inbound.queue name : **Inbound.Test.DDD
> > > > > Outbound.queue name : SOURHQueueName
> > > > >
> > > > > *
> > > > > *Criteria or Condition :
> > > > > *
> > > > > Message property *PAST_EVENT_INTERVAL type* is : *0*
> > > > >    *AND*
> > > > > Message *Type* value is : *card.test *or* card.expiry.test*
> > > > >
> > > > > *Example 2:*
> > > > >
> > > > > *Inbound.queue name : **Inbound.Test.SSS
> > > > > Outbound.queue name : WESTQueueName
> > > > > *
> > > > > *Criteria or Condition :*
> > > > > Message property *PAST_EVENT_INTERVAL type* is : *0*
> > > > >  *AND
> > > > > *
> > > > > Message *Type *value *start with* :*card.event*
> > > > >
> > > > > I want achieve this using camel routing java DSL.
> > > > >
> > > > > Please help me.How can i use AND,OR and regular expression in
> camel
> > > > routing
> > > > >
> > > > > *Regards*
> > > > > Prabu.N
> > > > >
> > > > >
> > > > > On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
> > > > > [hidden email] <
> http://user/SendEmail.jtp?type=node&node=5730195&i=3
>
> > >>
> > > wrote:
> > > > >
> > > > >> Hi Claus,
> > > > >>
> > > > >> Thanks for the response - I could not see any obvious way to
> > > configure
> > > > >> an FTP Consumer at ***runtime***,
> > > > >> either via bean, processor or consumer template.  If you have a
> > > > >> concrete example, that would be great to see...
> > > > >>
> > > > >> ...otherwise, here's the solution I came up with:
> > > > >>
> > > > >>
> > > > >>     -Chris
> > > > >>
> > > > >>
> > > > >>
> > > > >>   // simulate incoming message from JMS...
> > > > >>   from("timer:kickoff?repeatCount=1")
> > > > >>   .to("direct:start");
> > > > >>
> > > > >>   // upon receipt of FTP config from JMS, invoke  FtpConfigurer
> bean
> > > > >> to reconfigure
> > > > >>   // FTP route, then start it...
> > > > >>   from("direct:start")
> > > > >>   .beanRef("configRdr") // config reader bean not shown here
> > > > >>   .convertBodyTo(Document.class)
> > > > >>   // sets a bunch of headers from DOM, e.g.:
> > > > >>
> > > > >>
> > > >
> > >
> >
> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>
> > >
> > > > >>
> > > > >> String.class)
> > > > >>   .setHeader("ftp-route-id", constant("ftp.route"))
> > > > >>   .beanRef("ftpConfigurer");
> > > > >>
> > > > >>   // FTP route will only be started by FtpConfigurer bean after
> it's
> > > > >> dynamically re-configured...
> > > > >>   from("ftp://bogushost/bogusdir?startScheduler=false") // the
>  URI
> > > > >> will be reconfigured...
> > > > >>   .routeId("ftp.route").noAutoStartup()
> > > > >>   .log("Received file ${file:onlyname}")
> > > > >>   .to("file:/tmp/local/data");
> > > > >>
> > > > >>   public class FtpConfigurer {
> > > > >>     public void configureFtpConsumer(Exchange exchange) throws
> > > Exception
> > > > >> {
> > > > >>         CamelContext context = exchange.getContext();
> > > > >>         Map<String, Object> headers =
> exchange.getIn().getHeaders();
> > > > >>         Map<String, Object> parameters = new HashMap<String,
> > > Object>();
> > > > >>
> > > > >>         // Filter headers for ftp-config specific headers...
> > > > >>         for (Map.Entry<String, Object> entry :
> headers.entrySet()) {
> > > > >>             String key = entry.getKey();
> > > > >>             if (key.startsWith("ftp-config."))
> > > > >>
> > parameters.put(key.substring("ftp-config.".length()),
> > > > >> entry.getValue());
> > > > >>         }
> > > > >>
> > > > >>         String routeId =
> exchange.getIn().getHeader("ftp-route-id",
> > > > >> String.class);
> > > > >>         Route ftpRoute = context.getRoute(routeId);
> > > > >>         FtpConsumer c = (FtpConsumer) ftpRoute.getConsumer();
> > > > >>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
> > > > >> c.getEndpoint();
> > > > >>         FtpConfiguration rfc = rfe.getConfiguration();
> > > > >>
> > > > >>         // Need to crack open FtpConsumer's "endpointPath" field
> > > since
> > > > >>         // there's no mutator (setter)
> > > > >>         Class<?> cls = c.getClass();
> > > > >>         Field endpointPath_fld =
> > > cls.getDeclaredField("endpointPath");
> > > > >>         endpointPath_fld.setAccessible(true);
> > > > >>         endpointPath_fld.set(c,
> > (String)parameters.get("directory"));
> > > > >>
> > > > >>         // Need to crack open FtpEndpoint, actually
> DefaultEndpoint
> > -
> > > > >> the ultimate base class
> > > > >>         // since there's no mutator (setter) for the
> "endpointUri"
> > > field
> > > > >>         cls = rfe.getClass();
> > > > >>         Field endpointUri_fld = null;
> > > > >>         while (endpointUri_fld == null) {
> > > > >>             // TODO: maybe change logic to just stop at
> > > > >> class=DefaultEndpoint
> > > > >>             // rather then using NoSuchFieldException
> > > > >>             try {
> > > > >>                 endpointUri_fld =
> > > cls.getDeclaredField("endpointUri");
> > > > >>             } catch (NoSuchFieldException nsfe) {
> > > > >>                 cls = cls.getSuperclass();
> > > > >>             }
> > > > >>         }
> > > > >>         endpointUri_fld.setAccessible(true);
> > > > >>         endpointUri_fld.set(rfe,
> > > > >>             String.format("ftp://%s/%s",
> > > > >> (String)parameters.get("host"),
> > > (String)parameters.get("directory")));
> > > > >>
> > > > >>         // set reference properties first as they use # syntax
> that
> > > > >> fools the regular properties setter
> > > > >>         EndpointHelper.setReferenceProperties(context, rfc,
> > > parameters);
> > > > >>         EndpointHelper.setProperties(context, rfc, parameters);
> > > > >>         EndpointHelper.setReferenceProperties(context, rfe,
> > > parameters);
> > > > >>         EndpointHelper.setProperties(context, rfe, parameters);
> > > > >>         c.setStartScheduler(true);
> > > > >>
> > > > >>         context.startRoute(routeId);
> > > > >>   }
> > > > >> }
> > > > >>
> > > > >> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden email]<
> > > > http://user/SendEmail.jtp?type=node&node=5730166&i=0>>
> > > > >> wrote:
> > > > >>
> > > > >> > Hi
> > > > >> >
> > > > >> > See this EIP
> > > > >> > http://camel.apache.org/content-enricher.html
> > > > >> >
> > > > >> > About pollEnrich.
> > > > >> >
> > > > >> > Though pollEnrich currently does support dynamic uris. Its on
> the
> > > > >> roadmap,
> > > > >> > for Camel 3.0.
> > > > >> > It requires an API change and thus isn't so easy to implement
> > > > currently
> > > > >> on
> > > > >> > 2.x.
> > > > >> >
> > > > >> > You can always use a java bean / camel processor, and consume
> the
> > > ftp
> > > > >> file
> > > > >> > from java code.
> > > > >> > For example using consumer template.
> > > > >> >
> > > > >> > As you use FTP you may want to set disconnect=true so the
> connect
> > > is
> > > > >> not
> > > > >> > remained open after usage.
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden email]<
> > > > http://user/SendEmail.jtp?type=node&node=5730166&i=1>>
> > > > >> wrote:
> > > > >> >
> > > > >> >> Ok, I'm starting to get it - a little bit.  As for my concrete
> > > > >> >> example, so far, I have:
> > > > >> >>
> > > > >> >>                 from("direct:start")
> > > > >> >>                 .beanRef("config")
> > > > >> >>                 .convertBodyTo(Document.class)
> > > > >> >>                 .recipientList().xquery(
> > > > >> >>                     "concat('ftp://'" +
> > > > >> >>
> > > > >> ",//remote[vendorId/@value='CBOE34']/server/@value" +
> > > > >> >>
> > > > >> >>
> > > > >> >>
> > > > >>
> > > >
> > >
> >
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>
> > >
> > > > >>
> > > > >> >> +
> > > > >> >>                     ",'?noop=true&amp;username='" +
> > > > >> >>
> > > > >> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> > > > >> >>                     ",'&amp;password='" +
> > > > >> >>
> > > > >> >> ",//remote[vendorId/@value='CBOE34']/password/@value)",
> > > > String.class);
> > > > >> >>
> > > > >> >> Here's the problem - this will create an FTP Producer - that's
> > not
> > > > >> >> what I need.  I need a dynamically
> > > > >> >> constructed URI for a polling FTP consumer.  I don't think
> > > > >> >> "recipientList" will work...   Any ideas?
> > > > >> >>
> > > > >> >> Thanks,
> > > > >> >>
> > > > >> >> Chris
> > > > >> >>
> > > > >> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<
> > > > http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
> > > > >> wrote:
> > > > >> >> > Hi Claus,
> > > > >> >> >
> > > > >> >> > I hate to ask this - but I still don't get it.  I thought
> > > > >> >> > "recipientList" was for sending to multiple, runtime-defined
> > > > >> >> > recipients.  I don't see how this
> > > > >> >> > answers the question of sending to one, single recipient,
> whose
> > > URI
> > > > >> is
> > > > >> >> > dynamically constructed - and in my use-case the dynamic
> > > settings
> > > > >> >> > are not in properties - so "simple" (property place-holders)
> > > won't
> > > > >> help
> > > > >> >> me.
> > > > >> >> >
> > > > >> >> > Let me give you a concrete example.  I need to do an ftp
> > > download
> > > > >> and
> > > > >> >> > the connection information comes from up-stream in the route
> in
> > > the
> > > > >> >> > form of XML (DOM - a Document instance).  Currently, I am
> > trying
> > > to
> > > > >> do
> > > > >> >> > this with bean binding and method params decorated with
> @XPath
> > > > >> >> > pointing into the Document with the ftp settings and inside
> the
> > > > >> >> > this method doing:
> > > > >> >> >
> > > > >> >> > FtpComponent ftpComponent = context.getComponent("ftp",
> > > > >> >> FtpComponent.class);
> > > > >> >> >
> > > > >> >> > ..and then attempt to get the endpoint and call
> > > > createConsumer(...).
> > > > >> >> > I'm sure this is not the right way to do it, but I don't see
> > how
> > > > >> else
> > > > >> >> > - any ideas?
> > > > >> >> >
> > > > >> >> > Thanks,
> > > > >> >> >
> > > > >> >> >
> > > > >> >> > Chris
> > > > >> >> >
> > > > >> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden
> email]<
> > > > http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
> > > > >>
> > > > >> >> wrote:
> > > > >> >> >> Hi
> > > > >> >> >>
> > > > >> >> >> See this FAQ
> > > > >> >> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> > > > >> >> >>
> > > > >> >> >>
> > > > >> >> >>
> > > > >> >> >>
> > > > >> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<
> > > > http://user/SendEmail.jtp?type=node&node=5730166&i=4>
> > > > >> >> >> <[hidden email]<
> > > > http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
> > > > >>
> > > > >> >> >>
> > > > >> >> >>> Thanks Walzer..
> > > > >> >> >>> *
> > > > >> >> >>> *
> > > > >> >> >>> *Queston1:
> > > > >> >> >>>
> > > > >> >> >>> *
> > > > >> >> >>> *Example*
> > > > >> >> >>>
> > > > >> >> >>> .when(header("foo").isEqualTo("bar"))
> > > > >> >> >>>                     .to("direct:b")
> > > > >> >> >>>
> > > > >> >> >>> In my case i have to add more than 80 condition and
> forwards
> > > to
> > > > 80
> > > > >> >> >>> different queues.
> > > > >> >> >>>
> > > > >> >> >>> Above example i can only hard-code queue name,But what i
> want
> > > is
> > > > >> below.
> > > > >> >> >>>
> > > > >> >> >>> * .when(header("Type").isNotNull())
> > > > >> >> >>>     .to("activemq.Inbound."+header("Type"))
> > > > >> >> >>> *
> > > > >> >> >>>
> > > > >> >> >>> Example:If queue type is test,It should forward to
> > > *Inbound.test*
> > > > >> >> queue.
> > > > >> >> >>>
> > > > >> >> >>> Above example i tried,but it did not worked,created queue
> > > > >> something
> > > > >> >> >>> like this *Inbound.header("type")*
> > > > >> >> >>>
> > > > >> >> >>> *Question2*:
> > > > >> >> >>>
> > > > >> >> >>> from("direct:a")
> > > > >> >> >>>             .multicast().to("direct:b", "direct:c",
> > > "direct:d");
> > > > >> >> >>>
> > > > >> >> >>> Based on messages header and content type i want forward
> to
> > > > >> different
> > > > >> >> >>> queue.
> > > > >> >> >>>
> > > > >> >> >>> condition will be *OR *and *AND*.How can i do that like
> above
> > > > >> example.*
> > > > >> >> >>> *
> > > > >> >> >>>
> > > > >> >> >>> Thanks in advance*
> > > > >> >> >>> *
> > > > >> >> >>>
> > > > >> >> >>> *Regards*
> > > > >> >> >>>
> > > > >> >> >>> Prabu.N
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via
> Camel] <
> > > > >> >> >>> [hidden email]<
> > > > http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
> > > > >> wrote:
> > > > >> >> >>>
> > > > >> >> >>> > Hi,
> > > > >> >> >>> >
> > > > >> >> >>> > you could start by reading Claus´ book (p. 44ff) which
> has
> > a
> > > > >> perfect
> > > > >> >> >>> > example or
> > > http://camel.apache.org/content-based-router.html(just
> > > > >>
> > > > >> >> >>> > replace the direct: with your queues).
> > > > >> >> >>> > If you need to fire your messages to multiple queues:
> > > > >> >> >>> >
> http://camel.apache.org/publish-subscribe-channel.htmlshows
> > >
> > > > >> you the
> > > > >> >> >>> > various ways.
> > > > >> >> >>> > When you get the concepts you can just "lego" them
> > together.
> > > > >> >> >>> >
> > > > >> >> >>> > Regards, Thomas.
> > > > >> >> >>> >
> > > > >> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> > > > >> >> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> > > > >> >> >>> > <[hidden email] <
> > > > >> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> > > > >> >> >>> >
> > > > >> >> >>> > > Hi Claus,
> > > > >> >> >>> > >
> > > > >> >> >>> > > Thanks so much Clus for help.It is working now.
> > > > >> >> >>> > >
> > > > >> >> >>> > > I need your guidance for the following requirement.
> > > > >> >> >>> > >
> > > > >> >> >>> > > 1.I have one *inbound queue* it will receive message
> > > > >> frequently
> > > > >> >> from my
> > > > >> >> >>> > > application.
> > > > >> >> >>> > > 2.From *inbound queue* i need camel routing to move
> > > message
> > > > >> from
> > > > >> >> >>> > > another *message
> > > > >> >> >>> > > based inbound queue* based on message header value.
> > > > >> >> >>> > > 3.From *message based inbound queue *i* *need camel
> > > routing
> > > > to
> > > > >> move
> > > > >> >> >>> > message
> > > > >> >> >>> > > to *one or more outbound queue *based on message
> content*
> > > > >> >> >>> > > *
> > > > >> >> >>> > >
> > > > >> >> >>> > > I need *camel java DSL*sample code for above
> > requirement.*
> > > > >> >> >>> > > *
> > > > >> >> >>> > > *
> > > > >> >> >>> > > *
> > > > >> >> >>> > > *Thanks in advance*
> > > > >> >> >>> > >
> > > > >> >> >>> > >
> > > > >> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via
> > Camel]
> > > <
> > > > >> >> >>> > > [hidden email] <
> > > > >> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> > > > >> >> >>> > wrote:
> > > > >> >> >>> > >
> > > > >> >> >>> > >> Hi
> > > > >> >> >>> > >>
> > > > >> >> >>> > >> Do as the exception tells you. Check route 2. You
> route
> > > from
> > > > >> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know to
> Camel.
> > > > >> >> >>> > >>
> > > > >> >> >>> > >> Maybe you need to add "activemq:" as prefix so its
> > > > >> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
> > > > >> >> >>> > >>
> > > > >> >> >>> > >>
> > > > >> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> > > > >> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> > > > >> >> >>> > >> <[hidden email] <
> > > > >> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> > > > >> >> >>> >>
> > > > >> >> >>> >
> > > > >> >> >>> > >> wrote:
> > > > >> >> >>> > >>
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>> I have activemmq  Project in that i have following
> > > > >> requirement
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>> 1.Move message from Inbound queue to type based
> inbound
> > > > >> queue.
> > > > >> >> >>> > >>> 2.Move message from Message type inbound queue to
> > > outbound
> > > > >> queue
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>> I have created two bean for to achieve this.
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>> 1.one for move from inbound to message type  inbound
> > > queue
> > > > >> >> >>> > >>> 2.one for move from inbound to outbound queue.
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>> I have following entry in camel.xml
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>>   <camelContext id="camel" xmlns="
> > > > >> >> >>> > http://camel.apache.org/schema/spring">
> > > > >> >> >>> > >>
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>>                <routeBuilder ref="routeBuilder" />
> > > > >> >> >>> > >>>            <routeBuilder ref="routeBuilder1" />
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>>    </camelContext>
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>>    <bean id="routeBuilder"
> > > > >> >> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> > > > >> >> >>> > >>>    <bean id="recipientsGenerator"
> > > > >> >> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> > > > >> >> >>> > >>>    <bean id="routeBuilder1"
> > > > >> >> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
> > > > >> >> >>> > >>>    <bean id="recipientsGenerator1"
> > > > >> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>> When i run application i am getting following error.
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>> * java.lang.Exception:
> > > > >> org.apache.camel.RuntimeCamelException:
> > > > >> >> >>> > >>> org.apache.camel.Fa
> > > > >> >> >>> > >>> iledToCreateRouteException: Failed to create route
> > > route2:
> > > > >> >> >>> > >>> Route[[From[Inbound.G
> > > > >> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because
> of
> > No
> > > > >> endpoint
> > > > >> >> >>> > could
> > > > >> >> >>> > >> be
> > > > >> >> >>> > >>> found
> > > > >> >> >>> > >>> for: Inbound.SSS.TestEvent, please check your
> classpath
> > > > >> contains
> > > > >> >> the
> > > > >> >> >>> > >> needed
> > > > >> >> >>> > >>> Cam
> > > > >> >> >>> > >>> el component jar.*
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>> I am not sure i am missing any configuration,Please
> > > kindly
> > > > >> help
> > > > >> >> me
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>>
> > > > >> >> >>> > >>> --
> > > > >> >> >>> > >>> View this message in context:
> > > > >> >> >>> > >>
> > > > >> >>
> > > http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> > > > >> >> >>> > >>> Sent from the Camel - Users mailing list archive at
> > > > >> Nabble.com.
> > > > >> >> >>> > >>
> > > > >> >> >>> > >>
> > > > >> >> >>> > >>
> > > > >> >> >>> > >> --
> > > > >> >> >>> > >> Claus Ibsen
> > > > >> >> >>> > >> -----------------
> > > > >> >> >>> > >> Red Hat, Inc.
> > > > >> >> >>> > >> FuseSource is now part of Red Hat
> > > > >> >> >>> > >> Email: [hidden email]<
> > > > >> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> > > > >> >> >>> > >> Web: http://fusesource.com
> > > > >> >> >>> > >> Twitter: davsclaus
> > > > >> >> >>> > >> Blog: http://davsclaus.com
> > > > >> >> >>> > >> Author of Camel in Action:
> http://www.manning.com/ibsen
> > > > >> >> >>> > >>
> > > > >> >> >>> > >>
> > > > >> >> >>> > >> ------------------------------
> > > > >> >> >>> > >> If you reply to this email, your message will be
> added
> > to
> > > > the
> > > > >> >> >>> > discussion
> > > > >> >> >>> > >> below:
> > > > >> >> >>> > >>
> > > > >> >> >>> > >>
> > > > >> >> >>> >
> > > > >> >> >>> > >> .
> > > > >> >> >>> > >> 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
> > > > >> >> >>> >
> > > > >> >> >>> >
> > > > >> >> >>> > >>
> > > > >> >> >>> > >
> > > > >> >> >>> > >
> > > > >> >> >>> > >
> > > > >> >> >>> > > --
> > > > >> >> >>> > > Thanks & Regards
> > > > >> >> >>> > > Prabu.N
> > > > >> >> >>> > >
> > > > >> >> >>> > >
> > > > >> >> >>> > >
> > > > >> >> >>> > >
> > > > >> >> >>> > > --
> > > > >> >> >>> > > View this message in context:
> > > > >> >> >>> >
> > > > >> >> >>>
> > > > >> >>
> > > > >>
> > > >
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> > > > >> >> >>> >
> > > > >> >> >>> > > Sent from the Camel - Users mailing list archive at
> > > > >> Nabble.com.
> > > > >> >> >>> >
> > > > >> >> >>> >
> > > > >> >> >>> >
> > > > >> >> >>> > ------------------------------
> > > > >> >> >>> >  If you reply to this email, your message will be added
> to
> > > the
> > > > >> >> discussion
> > > > >> >> >>> > below:
> > > > >> >> >>> >
> > > > >> >> >>> >
> > > > >> >> >>>
> > > > >> >>
> > > > >>
> > > >
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> > > > >> >> >>> >  To unsubscribe from Camel routing issue, 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
> > > > >> >> >>> >
> > > > >> >> >>> >
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>> --
> > > > >> >> >>> Thanks & Regards
> > > > >> >> >>>  Prabu.N
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>>
> > > > >> >> >>> --
> > > > >> >> >>> View this message in context:
> > > > >> >> >>>
> > > > >> >>
> > > > >>
> > > >
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> > > > >> >> >>> Sent from the Camel - Users mailing list archive at
> > > Nabble.com.
> > > > >> >> >>>
> > > > >> >> >>
> > > > >> >> >>
> > > > >> >> >>
> > > > >> >> >> --
> > > > >> >> >> Claus Ibsen
> > > > >> >> >> -----------------
> > > > >> >> >> Red Hat, Inc.
> > > > >> >> >> FuseSource is now part of Red Hat
> > > > >> >> >> Email: [hidden email]<
> > > > http://user/SendEmail.jtp?type=node&node=5730166&i=7>
> > > > >> >> >> Web: http://fusesource.com
> > > > >> >> >> Twitter: davsclaus
> > > > >> >> >> Blog: http://davsclaus.com
> > > > >> >> >> Author of Camel in Action: http://www.manning.com/ibsen
> > > > >> >>
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > --
> > > > >> > Claus Ibsen
> > > > >> > -----------------
> > > > >> > Red Hat, Inc.
> > > > >> > FuseSource is now part of Red Hat
> > > > >> > Email: [hidden email]<
> > > > http://user/SendEmail.jtp?type=node&node=5730166&i=8>
> > > > >> > Web: http://fusesource.com
> > > > >> > Twitter: davsclaus
> > > > >> > Blog: http://davsclaus.com
> > > > >> > Author of Camel in Action: http://www.manning.com/ibsen
> > > > >>
> > > > >>
> > > > >> ------------------------------
> > > > >>  If you reply to this email, your message will be added to the
> > > > >> discussion below:
> > > > >>
> > > > >>
> > > >
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
> > >
> > > > >>  To unsubscribe from Camel routing issue, 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
> > > > >
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Thanks & Regards
> > > > >  Prabu.N
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Thanks & Regards
> > > >  Prabu.N
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
> > >
> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > > >
> > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -----------------
> > > Red Hat, Inc.
> > > FuseSource is now part of Red Hat
> > > Email: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730195&i=4>
> > > Web: http://fusesource.com
> > > Twitter: davsclaus
> > > Blog: http://davsclaus.com
> > > Author of Camel in Action: http://www.manning.com/ibsen
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730195.html
>
> > >  To unsubscribe from Camel routing issue, 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
> > >
> > >
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730196.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730197&i=3>
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730197.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730198.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by Claus Ibsen <cl...@gmail.com>.
Yeah or jus static import those methods to make it easier to read

import static org.apache.camel.builder.PredicateBuilder.and;
import static org.apache.camel.builder.PredicateBuilder.or;



On Tue, Apr 2, 2013 at 10:38 AM, prabumca06@gmail.com
<pr...@gmail.com>wrote:

> So can i use like this..
>
> Predicate god =
> PredicateBuilder.and(admin,PredicateBuilder.or(body().contains("Camel
> Rider"), header("type").isEqualTo("god")));
>
>
> On Tue, Apr 2, 2013 at 2:05 PM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5730195h47@n5.nabble.com> wrote:
>
> > Hi
> >
> > You should static import those methods: and, or
> > on the class org.apache.camel.builder.PredicateBuilder
> >
> >
> http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/builder/PredicateBuilder.html
> >
> >
> >
> > On Tue, Apr 2, 2013 at 10:17 AM, [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730195&i=0>
> > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730195&i=1
> >>wrote:
> >
> >
> > > I have found solution in internet using Predicate  we can achieve this,
> > >
> > > But,one doubt in the link
> > > http://camel.apache.org/predicate.html,Theymentioned that we can use
> > > AND and OR in Predicate
> > >
> > > I have added below code in project,But i am getting compilation
> > > error.Please kindly help
> > >
> > > *Predicate god = and(admin, or(body().contains("Camel Rider"),
> > > header("type").isEqualTo("god")));*
> > >
> > > *Thanks*
> > > Prabu.N
> > >
> > >
> > > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730195&i=2>>
> > wrote:
> > >
> > > > Hi *Chris / **Claus*,
> > > >
> > > > I have one *Inbound* queue,based on header and content type,I want
> > > > forward to outbound queue.
> > > > *
> > > > Example 1:
> > > > *
> > > > *
> > > > Inbound.queue name : **Inbound.Test.DDD
> > > > Outbound.queue name : SOURHQueueName
> > > >
> > > > *
> > > > *Criteria or Condition :
> > > > *
> > > > Message property *PAST_EVENT_INTERVAL type* is : *0*
> > > >    *AND*
> > > > Message *Type* value is : *card.test *or* card.expiry.test*
> > > >
> > > > *Example 2:*
> > > >
> > > > *Inbound.queue name : **Inbound.Test.SSS
> > > > Outbound.queue name : WESTQueueName
> > > > *
> > > > *Criteria or Condition :*
> > > > Message property *PAST_EVENT_INTERVAL type* is : *0*
> > > >  *AND
> > > > *
> > > > Message *Type *value *start with* :*card.event*
> > > >
> > > > I want achieve this using camel routing java DSL.
> > > >
> > > > Please help me.How can i use AND,OR and regular expression in camel
> > > routing
> > > >
> > > > *Regards*
> > > > Prabu.N
> > > >
> > > >
> > > > On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
> > > > [hidden email] <http://user/SendEmail.jtp?type=node&node=5730195&i=3
> >>
> > wrote:
> > > >
> > > >> Hi Claus,
> > > >>
> > > >> Thanks for the response - I could not see any obvious way to
> > configure
> > > >> an FTP Consumer at ***runtime***,
> > > >> either via bean, processor or consumer template.  If you have a
> > > >> concrete example, that would be great to see...
> > > >>
> > > >> ...otherwise, here's the solution I came up with:
> > > >>
> > > >>
> > > >>     -Chris
> > > >>
> > > >>
> > > >>
> > > >>   // simulate incoming message from JMS...
> > > >>   from("timer:kickoff?repeatCount=1")
> > > >>   .to("direct:start");
> > > >>
> > > >>   // upon receipt of FTP config from JMS, invoke  FtpConfigurer bean
> > > >> to reconfigure
> > > >>   // FTP route, then start it...
> > > >>   from("direct:start")
> > > >>   .beanRef("configRdr") // config reader bean not shown here
> > > >>   .convertBodyTo(Document.class)
> > > >>   // sets a bunch of headers from DOM, e.g.:
> > > >>
> > > >>
> > >
> >
> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
> >
> > > >>
> > > >> String.class)
> > > >>   .setHeader("ftp-route-id", constant("ftp.route"))
> > > >>   .beanRef("ftpConfigurer");
> > > >>
> > > >>   // FTP route will only be started by FtpConfigurer bean after it's
> > > >> dynamically re-configured...
> > > >>   from("ftp://bogushost/bogusdir?startScheduler=false") // the  URI
> > > >> will be reconfigured...
> > > >>   .routeId("ftp.route").noAutoStartup()
> > > >>   .log("Received file ${file:onlyname}")
> > > >>   .to("file:/tmp/local/data");
> > > >>
> > > >>   public class FtpConfigurer {
> > > >>     public void configureFtpConsumer(Exchange exchange) throws
> > Exception
> > > >> {
> > > >>         CamelContext context = exchange.getContext();
> > > >>         Map<String, Object> headers = exchange.getIn().getHeaders();
> > > >>         Map<String, Object> parameters = new HashMap<String,
> > Object>();
> > > >>
> > > >>         // Filter headers for ftp-config specific headers...
> > > >>         for (Map.Entry<String, Object> entry : headers.entrySet()) {
> > > >>             String key = entry.getKey();
> > > >>             if (key.startsWith("ftp-config."))
> > > >>
> parameters.put(key.substring("ftp-config.".length()),
> > > >> entry.getValue());
> > > >>         }
> > > >>
> > > >>         String routeId = exchange.getIn().getHeader("ftp-route-id",
> > > >> String.class);
> > > >>         Route ftpRoute = context.getRoute(routeId);
> > > >>         FtpConsumer c = (FtpConsumer) ftpRoute.getConsumer();
> > > >>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
> > > >> c.getEndpoint();
> > > >>         FtpConfiguration rfc = rfe.getConfiguration();
> > > >>
> > > >>         // Need to crack open FtpConsumer's "endpointPath" field
> > since
> > > >>         // there's no mutator (setter)
> > > >>         Class<?> cls = c.getClass();
> > > >>         Field endpointPath_fld =
> > cls.getDeclaredField("endpointPath");
> > > >>         endpointPath_fld.setAccessible(true);
> > > >>         endpointPath_fld.set(c,
> (String)parameters.get("directory"));
> > > >>
> > > >>         // Need to crack open FtpEndpoint, actually DefaultEndpoint
> -
> > > >> the ultimate base class
> > > >>         // since there's no mutator (setter) for the "endpointUri"
> > field
> > > >>         cls = rfe.getClass();
> > > >>         Field endpointUri_fld = null;
> > > >>         while (endpointUri_fld == null) {
> > > >>             // TODO: maybe change logic to just stop at
> > > >> class=DefaultEndpoint
> > > >>             // rather then using NoSuchFieldException
> > > >>             try {
> > > >>                 endpointUri_fld =
> > cls.getDeclaredField("endpointUri");
> > > >>             } catch (NoSuchFieldException nsfe) {
> > > >>                 cls = cls.getSuperclass();
> > > >>             }
> > > >>         }
> > > >>         endpointUri_fld.setAccessible(true);
> > > >>         endpointUri_fld.set(rfe,
> > > >>             String.format("ftp://%s/%s",
> > > >> (String)parameters.get("host"),
> > (String)parameters.get("directory")));
> > > >>
> > > >>         // set reference properties first as they use # syntax that
> > > >> fools the regular properties setter
> > > >>         EndpointHelper.setReferenceProperties(context, rfc,
> > parameters);
> > > >>         EndpointHelper.setProperties(context, rfc, parameters);
> > > >>         EndpointHelper.setReferenceProperties(context, rfe,
> > parameters);
> > > >>         EndpointHelper.setProperties(context, rfe, parameters);
> > > >>         c.setStartScheduler(true);
> > > >>
> > > >>         context.startRoute(routeId);
> > > >>   }
> > > >> }
> > > >>
> > > >> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730166&i=0>>
> > > >> wrote:
> > > >>
> > > >> > Hi
> > > >> >
> > > >> > See this EIP
> > > >> > http://camel.apache.org/content-enricher.html
> > > >> >
> > > >> > About pollEnrich.
> > > >> >
> > > >> > Though pollEnrich currently does support dynamic uris. Its on the
> > > >> roadmap,
> > > >> > for Camel 3.0.
> > > >> > It requires an API change and thus isn't so easy to implement
> > > currently
> > > >> on
> > > >> > 2.x.
> > > >> >
> > > >> > You can always use a java bean / camel processor, and consume the
> > ftp
> > > >> file
> > > >> > from java code.
> > > >> > For example using consumer template.
> > > >> >
> > > >> > As you use FTP you may want to set disconnect=true so the connect
> > is
> > > >> not
> > > >> > remained open after usage.
> > > >> >
> > > >> >
> > > >> >
> > > >> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730166&i=1>>
> > > >> wrote:
> > > >> >
> > > >> >> Ok, I'm starting to get it - a little bit.  As for my concrete
> > > >> >> example, so far, I have:
> > > >> >>
> > > >> >>                 from("direct:start")
> > > >> >>                 .beanRef("config")
> > > >> >>                 .convertBodyTo(Document.class)
> > > >> >>                 .recipientList().xquery(
> > > >> >>                     "concat('ftp://'" +
> > > >> >>
> > > >> ",//remote[vendorId/@value='CBOE34']/server/@value" +
> > > >> >>
> > > >> >>
> > > >> >>
> > > >>
> > >
> >
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
> >
> > > >>
> > > >> >> +
> > > >> >>                     ",'?noop=true&amp;username='" +
> > > >> >>
> > > >> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> > > >> >>                     ",'&amp;password='" +
> > > >> >>
> > > >> >> ",//remote[vendorId/@value='CBOE34']/password/@value)",
> > > String.class);
> > > >> >>
> > > >> >> Here's the problem - this will create an FTP Producer - that's
> not
> > > >> >> what I need.  I need a dynamically
> > > >> >> constructed URI for a polling FTP consumer.  I don't think
> > > >> >> "recipientList" will work...   Any ideas?
> > > >> >>
> > > >> >> Thanks,
> > > >> >>
> > > >> >> Chris
> > > >> >>
> > > >> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
> > > >> wrote:
> > > >> >> > Hi Claus,
> > > >> >> >
> > > >> >> > I hate to ask this - but I still don't get it.  I thought
> > > >> >> > "recipientList" was for sending to multiple, runtime-defined
> > > >> >> > recipients.  I don't see how this
> > > >> >> > answers the question of sending to one, single recipient, whose
> > URI
> > > >> is
> > > >> >> > dynamically constructed - and in my use-case the dynamic
> > settings
> > > >> >> > are not in properties - so "simple" (property place-holders)
> > won't
> > > >> help
> > > >> >> me.
> > > >> >> >
> > > >> >> > Let me give you a concrete example.  I need to do an ftp
> > download
> > > >> and
> > > >> >> > the connection information comes from up-stream in the route in
> > the
> > > >> >> > form of XML (DOM - a Document instance).  Currently, I am
> trying
> > to
> > > >> do
> > > >> >> > this with bean binding and method params decorated with @XPath
> > > >> >> > pointing into the Document with the ftp settings and inside the
> > > >> >> > this method doing:
> > > >> >> >
> > > >> >> > FtpComponent ftpComponent = context.getComponent("ftp",
> > > >> >> FtpComponent.class);
> > > >> >> >
> > > >> >> > ..and then attempt to get the endpoint and call
> > > createConsumer(...).
> > > >> >> > I'm sure this is not the right way to do it, but I don't see
> how
> > > >> else
> > > >> >> > - any ideas?
> > > >> >> >
> > > >> >> > Thanks,
> > > >> >> >
> > > >> >> >
> > > >> >> > Chris
> > > >> >> >
> > > >> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
> > > >>
> > > >> >> wrote:
> > > >> >> >> Hi
> > > >> >> >>
> > > >> >> >> See this FAQ
> > > >> >> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> > > >> >> >>
> > > >> >> >>
> > > >> >> >>
> > > >> >> >>
> > > >> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730166&i=4>
> > > >> >> >> <[hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
> > > >>
> > > >> >> >>
> > > >> >> >>> Thanks Walzer..
> > > >> >> >>> *
> > > >> >> >>> *
> > > >> >> >>> *Queston1:
> > > >> >> >>>
> > > >> >> >>> *
> > > >> >> >>> *Example*
> > > >> >> >>>
> > > >> >> >>> .when(header("foo").isEqualTo("bar"))
> > > >> >> >>>                     .to("direct:b")
> > > >> >> >>>
> > > >> >> >>> In my case i have to add more than 80 condition and forwards
> > to
> > > 80
> > > >> >> >>> different queues.
> > > >> >> >>>
> > > >> >> >>> Above example i can only hard-code queue name,But what i want
> > is
> > > >> below.
> > > >> >> >>>
> > > >> >> >>> * .when(header("Type").isNotNull())
> > > >> >> >>>     .to("activemq.Inbound."+header("Type"))
> > > >> >> >>> *
> > > >> >> >>>
> > > >> >> >>> Example:If queue type is test,It should forward to
> > *Inbound.test*
> > > >> >> queue.
> > > >> >> >>>
> > > >> >> >>> Above example i tried,but it did not worked,created queue
> > > >> something
> > > >> >> >>> like this *Inbound.header("type")*
> > > >> >> >>>
> > > >> >> >>> *Question2*:
> > > >> >> >>>
> > > >> >> >>> from("direct:a")
> > > >> >> >>>             .multicast().to("direct:b", "direct:c",
> > "direct:d");
> > > >> >> >>>
> > > >> >> >>> Based on messages header and content type i want forward to
> > > >> different
> > > >> >> >>> queue.
> > > >> >> >>>
> > > >> >> >>> condition will be *OR *and *AND*.How can i do that like above
> > > >> example.*
> > > >> >> >>> *
> > > >> >> >>>
> > > >> >> >>> Thanks in advance*
> > > >> >> >>> *
> > > >> >> >>>
> > > >> >> >>> *Regards*
> > > >> >> >>>
> > > >> >> >>> Prabu.N
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
> > > >> >> >>> [hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
> > > >> wrote:
> > > >> >> >>>
> > > >> >> >>> > Hi,
> > > >> >> >>> >
> > > >> >> >>> > you could start by reading Claus´ book (p. 44ff) which has
> a
> > > >> perfect
> > > >> >> >>> > example or
> > http://camel.apache.org/content-based-router.html(just
> > > >>
> > > >> >> >>> > replace the direct: with your queues).
> > > >> >> >>> > If you need to fire your messages to multiple queues:
> > > >> >> >>> > http://camel.apache.org/publish-subscribe-channel.htmlshows
> >
> > > >> you the
> > > >> >> >>> > various ways.
> > > >> >> >>> > When you get the concepts you can just "lego" them
> together.
> > > >> >> >>> >
> > > >> >> >>> > Regards, Thomas.
> > > >> >> >>> >
> > > >> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> > > >> >> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> > > >> >> >>> > <[hidden email] <
> > > >> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> > > >> >> >>> >
> > > >> >> >>> > > Hi Claus,
> > > >> >> >>> > >
> > > >> >> >>> > > Thanks so much Clus for help.It is working now.
> > > >> >> >>> > >
> > > >> >> >>> > > I need your guidance for the following requirement.
> > > >> >> >>> > >
> > > >> >> >>> > > 1.I have one *inbound queue* it will receive message
> > > >> frequently
> > > >> >> from my
> > > >> >> >>> > > application.
> > > >> >> >>> > > 2.From *inbound queue* i need camel routing to move
> > message
> > > >> from
> > > >> >> >>> > > another *message
> > > >> >> >>> > > based inbound queue* based on message header value.
> > > >> >> >>> > > 3.From *message based inbound queue *i* *need camel
> > routing
> > > to
> > > >> move
> > > >> >> >>> > message
> > > >> >> >>> > > to *one or more outbound queue *based on message content*
> > > >> >> >>> > > *
> > > >> >> >>> > >
> > > >> >> >>> > > I need *camel java DSL*sample code for above
> requirement.*
> > > >> >> >>> > > *
> > > >> >> >>> > > *
> > > >> >> >>> > > *
> > > >> >> >>> > > *Thanks in advance*
> > > >> >> >>> > >
> > > >> >> >>> > >
> > > >> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via
> Camel]
> > <
> > > >> >> >>> > > [hidden email] <
> > > >> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> > > >> >> >>> > wrote:
> > > >> >> >>> > >
> > > >> >> >>> > >> Hi
> > > >> >> >>> > >>
> > > >> >> >>> > >> Do as the exception tells you. Check route 2. You route
> > from
> > > >> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
> > > >> >> >>> > >>
> > > >> >> >>> > >> Maybe you need to add "activemq:" as prefix so its
> > > >> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
> > > >> >> >>> > >>
> > > >> >> >>> > >>
> > > >> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> > > >> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> > > >> >> >>> > >> <[hidden email] <
> > > >> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> > > >> >> >>> >>
> > > >> >> >>> >
> > > >> >> >>> > >> wrote:
> > > >> >> >>> > >>
> > > >> >> >>> > >>>
> > > >> >> >>> > >>> I have activemmq  Project in that i have following
> > > >> requirement
> > > >> >> >>> > >>>
> > > >> >> >>> > >>> 1.Move message from Inbound queue to type based inbound
> > > >> queue.
> > > >> >> >>> > >>> 2.Move message from Message type inbound queue to
> > outbound
> > > >> queue
> > > >> >> >>> > >>>
> > > >> >> >>> > >>> I have created two bean for to achieve this.
> > > >> >> >>> > >>>
> > > >> >> >>> > >>> 1.one for move from inbound to message type  inbound
> > queue
> > > >> >> >>> > >>> 2.one for move from inbound to outbound queue.
> > > >> >> >>> > >>>
> > > >> >> >>> > >>> I have following entry in camel.xml
> > > >> >> >>> > >>>
> > > >> >> >>> > >>>   <camelContext id="camel" xmlns="
> > > >> >> >>> > http://camel.apache.org/schema/spring">
> > > >> >> >>> > >>
> > > >> >> >>> > >>>
> > > >> >> >>> > >>>                <routeBuilder ref="routeBuilder" />
> > > >> >> >>> > >>>            <routeBuilder ref="routeBuilder1" />
> > > >> >> >>> > >>>
> > > >> >> >>> > >>>    </camelContext>
> > > >> >> >>> > >>>
> > > >> >> >>> > >>>    <bean id="routeBuilder"
> > > >> >> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> > > >> >> >>> > >>>    <bean id="recipientsGenerator"
> > > >> >> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> > > >> >> >>> > >>>    <bean id="routeBuilder1"
> > > >> >> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
> > > >> >> >>> > >>>    <bean id="recipientsGenerator1"
> > > >> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> > > >> >> >>> > >>>
> > > >> >> >>> > >>> When i run application i am getting following error.
> > > >> >> >>> > >>>
> > > >> >> >>> > >>> * java.lang.Exception:
> > > >> org.apache.camel.RuntimeCamelException:
> > > >> >> >>> > >>> org.apache.camel.Fa
> > > >> >> >>> > >>> iledToCreateRouteException: Failed to create route
> > route2:
> > > >> >> >>> > >>> Route[[From[Inbound.G
> > > >> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of
> No
> > > >> endpoint
> > > >> >> >>> > could
> > > >> >> >>> > >> be
> > > >> >> >>> > >>> found
> > > >> >> >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath
> > > >> contains
> > > >> >> the
> > > >> >> >>> > >> needed
> > > >> >> >>> > >>> Cam
> > > >> >> >>> > >>> el component jar.*
> > > >> >> >>> > >>>
> > > >> >> >>> > >>> I am not sure i am missing any configuration,Please
> > kindly
> > > >> help
> > > >> >> me
> > > >> >> >>> > >>>
> > > >> >> >>> > >>>
> > > >> >> >>> > >>>
> > > >> >> >>> > >>>
> > > >> >> >>> > >>> --
> > > >> >> >>> > >>> View this message in context:
> > > >> >> >>> > >>
> > > >> >>
> > http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> > > >> >> >>> > >>> Sent from the Camel - Users mailing list archive at
> > > >> Nabble.com.
> > > >> >> >>> > >>
> > > >> >> >>> > >>
> > > >> >> >>> > >>
> > > >> >> >>> > >> --
> > > >> >> >>> > >> Claus Ibsen
> > > >> >> >>> > >> -----------------
> > > >> >> >>> > >> Red Hat, Inc.
> > > >> >> >>> > >> FuseSource is now part of Red Hat
> > > >> >> >>> > >> Email: [hidden email]<
> > > >> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> > > >> >> >>> > >> Web: http://fusesource.com
> > > >> >> >>> > >> Twitter: davsclaus
> > > >> >> >>> > >> Blog: http://davsclaus.com
> > > >> >> >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
> > > >> >> >>> > >>
> > > >> >> >>> > >>
> > > >> >> >>> > >> ------------------------------
> > > >> >> >>> > >> If you reply to this email, your message will be added
> to
> > > the
> > > >> >> >>> > discussion
> > > >> >> >>> > >> below:
> > > >> >> >>> > >>
> > > >> >> >>> > >>
> > > >> >> >>> >
> > > >> >> >>> > >> .
> > > >> >> >>> > >> 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
> > > >> >> >>> >
> > > >> >> >>> >
> > > >> >> >>> > >>
> > > >> >> >>> > >
> > > >> >> >>> > >
> > > >> >> >>> > >
> > > >> >> >>> > > --
> > > >> >> >>> > > Thanks & Regards
> > > >> >> >>> > > Prabu.N
> > > >> >> >>> > >
> > > >> >> >>> > >
> > > >> >> >>> > >
> > > >> >> >>> > >
> > > >> >> >>> > > --
> > > >> >> >>> > > View this message in context:
> > > >> >> >>> >
> > > >> >> >>>
> > > >> >>
> > > >>
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> > > >> >> >>> >
> > > >> >> >>> > > Sent from the Camel - Users mailing list archive at
> > > >> Nabble.com.
> > > >> >> >>> >
> > > >> >> >>> >
> > > >> >> >>> >
> > > >> >> >>> > ------------------------------
> > > >> >> >>> >  If you reply to this email, your message will be added to
> > the
> > > >> >> discussion
> > > >> >> >>> > below:
> > > >> >> >>> >
> > > >> >> >>> >
> > > >> >> >>>
> > > >> >>
> > > >>
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> > > >> >> >>> >  To unsubscribe from Camel routing issue, 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
> > > >> >> >>> >
> > > >> >> >>> >
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>> --
> > > >> >> >>> Thanks & Regards
> > > >> >> >>>  Prabu.N
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>>
> > > >> >> >>> --
> > > >> >> >>> View this message in context:
> > > >> >> >>>
> > > >> >>
> > > >>
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> > > >> >> >>> Sent from the Camel - Users mailing list archive at
> > Nabble.com.
> > > >> >> >>>
> > > >> >> >>
> > > >> >> >>
> > > >> >> >>
> > > >> >> >> --
> > > >> >> >> Claus Ibsen
> > > >> >> >> -----------------
> > > >> >> >> Red Hat, Inc.
> > > >> >> >> FuseSource is now part of Red Hat
> > > >> >> >> Email: [hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730166&i=7>
> > > >> >> >> Web: http://fusesource.com
> > > >> >> >> Twitter: davsclaus
> > > >> >> >> Blog: http://davsclaus.com
> > > >> >> >> Author of Camel in Action: http://www.manning.com/ibsen
> > > >> >>
> > > >> >
> > > >> >
> > > >> >
> > > >> > --
> > > >> > Claus Ibsen
> > > >> > -----------------
> > > >> > Red Hat, Inc.
> > > >> > FuseSource is now part of Red Hat
> > > >> > Email: [hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730166&i=8>
> > > >> > Web: http://fusesource.com
> > > >> > Twitter: davsclaus
> > > >> > Blog: http://davsclaus.com
> > > >> > Author of Camel in Action: http://www.manning.com/ibsen
> > > >>
> > > >>
> > > >> ------------------------------
> > > >>  If you reply to this email, your message will be added to the
> > > >> discussion below:
> > > >>
> > > >>
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
> >
> > > >>  To unsubscribe from Camel routing issue, 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
> > > >
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > Thanks & Regards
> > > >  Prabu.N
> > > >
> > >
> > >
> > >
> > > --
> > > Thanks & Regards
> > >  Prabu.N
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
> >
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > >
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Email: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730195&i=4>
> > Web: http://fusesource.com
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730195.html
> >  To unsubscribe from Camel routing issue, click here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
> >
> > .
> > 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
> >
> >
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730196.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
So can i use like this..

Predicate god =
PredicateBuilder.and(admin,PredicateBuilder.or(body().contains("Camel
Rider"), header("type").isEqualTo("god")));


On Tue, Apr 2, 2013 at 2:05 PM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5730195h47@n5.nabble.com> wrote:

> Hi
>
> You should static import those methods: and, or
> on the class org.apache.camel.builder.PredicateBuilder
>
> http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/builder/PredicateBuilder.html
>
>
>
> On Tue, Apr 2, 2013 at 10:17 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730195&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730195&i=1>>wrote:
>
>
> > I have found solution in internet using Predicate  we can achieve this,
> >
> > But,one doubt in the link
> > http://camel.apache.org/predicate.html,Theymentioned that we can use
> > AND and OR in Predicate
> >
> > I have added below code in project,But i am getting compilation
> > error.Please kindly help
> >
> > *Predicate god = and(admin, or(body().contains("Camel Rider"),
> > header("type").isEqualTo("god")));*
> >
> > *Thanks*
> > Prabu.N
> >
> >
> > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730195&i=2>>
> wrote:
> >
> > > Hi *Chris / **Claus*,
> > >
> > > I have one *Inbound* queue,based on header and content type,I want
> > > forward to outbound queue.
> > > *
> > > Example 1:
> > > *
> > > *
> > > Inbound.queue name : **Inbound.Test.DDD
> > > Outbound.queue name : SOURHQueueName
> > >
> > > *
> > > *Criteria or Condition :
> > > *
> > > Message property *PAST_EVENT_INTERVAL type* is : *0*
> > >    *AND*
> > > Message *Type* value is : *card.test *or* card.expiry.test*
> > >
> > > *Example 2:*
> > >
> > > *Inbound.queue name : **Inbound.Test.SSS
> > > Outbound.queue name : WESTQueueName
> > > *
> > > *Criteria or Condition :*
> > > Message property *PAST_EVENT_INTERVAL type* is : *0*
> > >  *AND
> > > *
> > > Message *Type *value *start with* :*card.event*
> > >
> > > I want achieve this using camel routing java DSL.
> > >
> > > Please help me.How can i use AND,OR and regular expression in camel
> > routing
> > >
> > > *Regards*
> > > Prabu.N
> > >
> > >
> > > On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
> > > [hidden email] <http://user/SendEmail.jtp?type=node&node=5730195&i=3>>
> wrote:
> > >
> > >> Hi Claus,
> > >>
> > >> Thanks for the response - I could not see any obvious way to
> configure
> > >> an FTP Consumer at ***runtime***,
> > >> either via bean, processor or consumer template.  If you have a
> > >> concrete example, that would be great to see...
> > >>
> > >> ...otherwise, here's the solution I came up with:
> > >>
> > >>
> > >>     -Chris
> > >>
> > >>
> > >>
> > >>   // simulate incoming message from JMS...
> > >>   from("timer:kickoff?repeatCount=1")
> > >>   .to("direct:start");
> > >>
> > >>   // upon receipt of FTP config from JMS, invoke  FtpConfigurer bean
> > >> to reconfigure
> > >>   // FTP route, then start it...
> > >>   from("direct:start")
> > >>   .beanRef("configRdr") // config reader bean not shown here
> > >>   .convertBodyTo(Document.class)
> > >>   // sets a bunch of headers from DOM, e.g.:
> > >>
> > >>
> >
> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>
> > >>
> > >> String.class)
> > >>   .setHeader("ftp-route-id", constant("ftp.route"))
> > >>   .beanRef("ftpConfigurer");
> > >>
> > >>   // FTP route will only be started by FtpConfigurer bean after it's
> > >> dynamically re-configured...
> > >>   from("ftp://bogushost/bogusdir?startScheduler=false") // the  URI
> > >> will be reconfigured...
> > >>   .routeId("ftp.route").noAutoStartup()
> > >>   .log("Received file ${file:onlyname}")
> > >>   .to("file:/tmp/local/data");
> > >>
> > >>   public class FtpConfigurer {
> > >>     public void configureFtpConsumer(Exchange exchange) throws
> Exception
> > >> {
> > >>         CamelContext context = exchange.getContext();
> > >>         Map<String, Object> headers = exchange.getIn().getHeaders();
> > >>         Map<String, Object> parameters = new HashMap<String,
> Object>();
> > >>
> > >>         // Filter headers for ftp-config specific headers...
> > >>         for (Map.Entry<String, Object> entry : headers.entrySet()) {
> > >>             String key = entry.getKey();
> > >>             if (key.startsWith("ftp-config."))
> > >>                 parameters.put(key.substring("ftp-config.".length()),
> > >> entry.getValue());
> > >>         }
> > >>
> > >>         String routeId = exchange.getIn().getHeader("ftp-route-id",
> > >> String.class);
> > >>         Route ftpRoute = context.getRoute(routeId);
> > >>         FtpConsumer c = (FtpConsumer) ftpRoute.getConsumer();
> > >>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
> > >> c.getEndpoint();
> > >>         FtpConfiguration rfc = rfe.getConfiguration();
> > >>
> > >>         // Need to crack open FtpConsumer's "endpointPath" field
> since
> > >>         // there's no mutator (setter)
> > >>         Class<?> cls = c.getClass();
> > >>         Field endpointPath_fld =
> cls.getDeclaredField("endpointPath");
> > >>         endpointPath_fld.setAccessible(true);
> > >>         endpointPath_fld.set(c, (String)parameters.get("directory"));
> > >>
> > >>         // Need to crack open FtpEndpoint, actually DefaultEndpoint -
> > >> the ultimate base class
> > >>         // since there's no mutator (setter) for the "endpointUri"
> field
> > >>         cls = rfe.getClass();
> > >>         Field endpointUri_fld = null;
> > >>         while (endpointUri_fld == null) {
> > >>             // TODO: maybe change logic to just stop at
> > >> class=DefaultEndpoint
> > >>             // rather then using NoSuchFieldException
> > >>             try {
> > >>                 endpointUri_fld =
> cls.getDeclaredField("endpointUri");
> > >>             } catch (NoSuchFieldException nsfe) {
> > >>                 cls = cls.getSuperclass();
> > >>             }
> > >>         }
> > >>         endpointUri_fld.setAccessible(true);
> > >>         endpointUri_fld.set(rfe,
> > >>             String.format("ftp://%s/%s",
> > >> (String)parameters.get("host"),
> (String)parameters.get("directory")));
> > >>
> > >>         // set reference properties first as they use # syntax that
> > >> fools the regular properties setter
> > >>         EndpointHelper.setReferenceProperties(context, rfc,
> parameters);
> > >>         EndpointHelper.setProperties(context, rfc, parameters);
> > >>         EndpointHelper.setReferenceProperties(context, rfe,
> parameters);
> > >>         EndpointHelper.setProperties(context, rfe, parameters);
> > >>         c.setStartScheduler(true);
> > >>
> > >>         context.startRoute(routeId);
> > >>   }
> > >> }
> > >>
> > >> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=0>>
> > >> wrote:
> > >>
> > >> > Hi
> > >> >
> > >> > See this EIP
> > >> > http://camel.apache.org/content-enricher.html
> > >> >
> > >> > About pollEnrich.
> > >> >
> > >> > Though pollEnrich currently does support dynamic uris. Its on the
> > >> roadmap,
> > >> > for Camel 3.0.
> > >> > It requires an API change and thus isn't so easy to implement
> > currently
> > >> on
> > >> > 2.x.
> > >> >
> > >> > You can always use a java bean / camel processor, and consume the
> ftp
> > >> file
> > >> > from java code.
> > >> > For example using consumer template.
> > >> >
> > >> > As you use FTP you may want to set disconnect=true so the connect
> is
> > >> not
> > >> > remained open after usage.
> > >> >
> > >> >
> > >> >
> > >> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=1>>
> > >> wrote:
> > >> >
> > >> >> Ok, I'm starting to get it - a little bit.  As for my concrete
> > >> >> example, so far, I have:
> > >> >>
> > >> >>                 from("direct:start")
> > >> >>                 .beanRef("config")
> > >> >>                 .convertBodyTo(Document.class)
> > >> >>                 .recipientList().xquery(
> > >> >>                     "concat('ftp://'" +
> > >> >>
> > >> ",//remote[vendorId/@value='CBOE34']/server/@value" +
> > >> >>
> > >> >>
> > >> >>
> > >>
> >
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>
> > >>
> > >> >> +
> > >> >>                     ",'?noop=true&amp;username='" +
> > >> >>
> > >> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> > >> >>                     ",'&amp;password='" +
> > >> >>
> > >> >> ",//remote[vendorId/@value='CBOE34']/password/@value)",
> > String.class);
> > >> >>
> > >> >> Here's the problem - this will create an FTP Producer - that's not
> > >> >> what I need.  I need a dynamically
> > >> >> constructed URI for a polling FTP consumer.  I don't think
> > >> >> "recipientList" will work...   Any ideas?
> > >> >>
> > >> >> Thanks,
> > >> >>
> > >> >> Chris
> > >> >>
> > >> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
> > >> wrote:
> > >> >> > Hi Claus,
> > >> >> >
> > >> >> > I hate to ask this - but I still don't get it.  I thought
> > >> >> > "recipientList" was for sending to multiple, runtime-defined
> > >> >> > recipients.  I don't see how this
> > >> >> > answers the question of sending to one, single recipient, whose
> URI
> > >> is
> > >> >> > dynamically constructed - and in my use-case the dynamic
> settings
> > >> >> > are not in properties - so "simple" (property place-holders)
> won't
> > >> help
> > >> >> me.
> > >> >> >
> > >> >> > Let me give you a concrete example.  I need to do an ftp
> download
> > >> and
> > >> >> > the connection information comes from up-stream in the route in
> the
> > >> >> > form of XML (DOM - a Document instance).  Currently, I am trying
> to
> > >> do
> > >> >> > this with bean binding and method params decorated with @XPath
> > >> >> > pointing into the Document with the ftp settings and inside the
> > >> >> > this method doing:
> > >> >> >
> > >> >> > FtpComponent ftpComponent = context.getComponent("ftp",
> > >> >> FtpComponent.class);
> > >> >> >
> > >> >> > ..and then attempt to get the endpoint and call
> > createConsumer(...).
> > >> >> > I'm sure this is not the right way to do it, but I don't see how
> > >> else
> > >> >> > - any ideas?
> > >> >> >
> > >> >> > Thanks,
> > >> >> >
> > >> >> >
> > >> >> > Chris
> > >> >> >
> > >> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
> > >>
> > >> >> wrote:
> > >> >> >> Hi
> > >> >> >>
> > >> >> >> See this FAQ
> > >> >> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> > >> >> >>
> > >> >> >>
> > >> >> >>
> > >> >> >>
> > >> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=4>
> > >> >> >> <[hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
> > >>
> > >> >> >>
> > >> >> >>> Thanks Walzer..
> > >> >> >>> *
> > >> >> >>> *
> > >> >> >>> *Queston1:
> > >> >> >>>
> > >> >> >>> *
> > >> >> >>> *Example*
> > >> >> >>>
> > >> >> >>> .when(header("foo").isEqualTo("bar"))
> > >> >> >>>                     .to("direct:b")
> > >> >> >>>
> > >> >> >>> In my case i have to add more than 80 condition and forwards
> to
> > 80
> > >> >> >>> different queues.
> > >> >> >>>
> > >> >> >>> Above example i can only hard-code queue name,But what i want
> is
> > >> below.
> > >> >> >>>
> > >> >> >>> * .when(header("Type").isNotNull())
> > >> >> >>>     .to("activemq.Inbound."+header("Type"))
> > >> >> >>> *
> > >> >> >>>
> > >> >> >>> Example:If queue type is test,It should forward to
> *Inbound.test*
> > >> >> queue.
> > >> >> >>>
> > >> >> >>> Above example i tried,but it did not worked,created queue
> > >> something
> > >> >> >>> like this *Inbound.header("type")*
> > >> >> >>>
> > >> >> >>> *Question2*:
> > >> >> >>>
> > >> >> >>> from("direct:a")
> > >> >> >>>             .multicast().to("direct:b", "direct:c",
> "direct:d");
> > >> >> >>>
> > >> >> >>> Based on messages header and content type i want forward to
> > >> different
> > >> >> >>> queue.
> > >> >> >>>
> > >> >> >>> condition will be *OR *and *AND*.How can i do that like above
> > >> example.*
> > >> >> >>> *
> > >> >> >>>
> > >> >> >>> Thanks in advance*
> > >> >> >>> *
> > >> >> >>>
> > >> >> >>> *Regards*
> > >> >> >>>
> > >> >> >>> Prabu.N
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
> > >> >> >>> [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
> > >> wrote:
> > >> >> >>>
> > >> >> >>> > Hi,
> > >> >> >>> >
> > >> >> >>> > you could start by reading Claus´ book (p. 44ff) which has a
> > >> perfect
> > >> >> >>> > example or
> http://camel.apache.org/content-based-router.html(just
> > >>
> > >> >> >>> > replace the direct: with your queues).
> > >> >> >>> > If you need to fire your messages to multiple queues:
> > >> >> >>> > http://camel.apache.org/publish-subscribe-channel.html shows
>
> > >> you the
> > >> >> >>> > various ways.
> > >> >> >>> > When you get the concepts you can just "lego" them together.
> > >> >> >>> >
> > >> >> >>> > Regards, Thomas.
> > >> >> >>> >
> > >> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> > >> >> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> > >> >> >>> > <[hidden email] <
> > >> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> > >> >> >>> >
> > >> >> >>> > > Hi Claus,
> > >> >> >>> > >
> > >> >> >>> > > Thanks so much Clus for help.It is working now.
> > >> >> >>> > >
> > >> >> >>> > > I need your guidance for the following requirement.
> > >> >> >>> > >
> > >> >> >>> > > 1.I have one *inbound queue* it will receive message
> > >> frequently
> > >> >> from my
> > >> >> >>> > > application.
> > >> >> >>> > > 2.From *inbound queue* i need camel routing to move
> message
> > >> from
> > >> >> >>> > > another *message
> > >> >> >>> > > based inbound queue* based on message header value.
> > >> >> >>> > > 3.From *message based inbound queue *i* *need camel
> routing
> > to
> > >> move
> > >> >> >>> > message
> > >> >> >>> > > to *one or more outbound queue *based on message content*
> > >> >> >>> > > *
> > >> >> >>> > >
> > >> >> >>> > > I need *camel java DSL*sample code for above requirement.*
> > >> >> >>> > > *
> > >> >> >>> > > *
> > >> >> >>> > > *
> > >> >> >>> > > *Thanks in advance*
> > >> >> >>> > >
> > >> >> >>> > >
> > >> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel]
> <
> > >> >> >>> > > [hidden email] <
> > >> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> > >> >> >>> > wrote:
> > >> >> >>> > >
> > >> >> >>> > >> Hi
> > >> >> >>> > >>
> > >> >> >>> > >> Do as the exception tells you. Check route 2. You route
> from
> > >> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
> > >> >> >>> > >>
> > >> >> >>> > >> Maybe you need to add "activemq:" as prefix so its
> > >> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
> > >> >> >>> > >>
> > >> >> >>> > >>
> > >> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> > >> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> > >> >> >>> > >> <[hidden email] <
> > >> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> > >> >> >>> >>
> > >> >> >>> >
> > >> >> >>> > >> wrote:
> > >> >> >>> > >>
> > >> >> >>> > >>>
> > >> >> >>> > >>> I have activemmq  Project in that i have following
> > >> requirement
> > >> >> >>> > >>>
> > >> >> >>> > >>> 1.Move message from Inbound queue to type based inbound
> > >> queue.
> > >> >> >>> > >>> 2.Move message from Message type inbound queue to
> outbound
> > >> queue
> > >> >> >>> > >>>
> > >> >> >>> > >>> I have created two bean for to achieve this.
> > >> >> >>> > >>>
> > >> >> >>> > >>> 1.one for move from inbound to message type  inbound
> queue
> > >> >> >>> > >>> 2.one for move from inbound to outbound queue.
> > >> >> >>> > >>>
> > >> >> >>> > >>> I have following entry in camel.xml
> > >> >> >>> > >>>
> > >> >> >>> > >>>   <camelContext id="camel" xmlns="
> > >> >> >>> > http://camel.apache.org/schema/spring">
> > >> >> >>> > >>
> > >> >> >>> > >>>
> > >> >> >>> > >>>                <routeBuilder ref="routeBuilder" />
> > >> >> >>> > >>>            <routeBuilder ref="routeBuilder1" />
> > >> >> >>> > >>>
> > >> >> >>> > >>>    </camelContext>
> > >> >> >>> > >>>
> > >> >> >>> > >>>    <bean id="routeBuilder"
> > >> >> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> > >> >> >>> > >>>    <bean id="recipientsGenerator"
> > >> >> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> > >> >> >>> > >>>    <bean id="routeBuilder1"
> > >> >> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
> > >> >> >>> > >>>    <bean id="recipientsGenerator1"
> > >> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> > >> >> >>> > >>>
> > >> >> >>> > >>> When i run application i am getting following error.
> > >> >> >>> > >>>
> > >> >> >>> > >>> * java.lang.Exception:
> > >> org.apache.camel.RuntimeCamelException:
> > >> >> >>> > >>> org.apache.camel.Fa
> > >> >> >>> > >>> iledToCreateRouteException: Failed to create route
> route2:
> > >> >> >>> > >>> Route[[From[Inbound.G
> > >> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No
> > >> endpoint
> > >> >> >>> > could
> > >> >> >>> > >> be
> > >> >> >>> > >>> found
> > >> >> >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath
> > >> contains
> > >> >> the
> > >> >> >>> > >> needed
> > >> >> >>> > >>> Cam
> > >> >> >>> > >>> el component jar.*
> > >> >> >>> > >>>
> > >> >> >>> > >>> I am not sure i am missing any configuration,Please
> kindly
> > >> help
> > >> >> me
> > >> >> >>> > >>>
> > >> >> >>> > >>>
> > >> >> >>> > >>>
> > >> >> >>> > >>>
> > >> >> >>> > >>> --
> > >> >> >>> > >>> View this message in context:
> > >> >> >>> > >>
> > >> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> > >> >> >>> > >>> Sent from the Camel - Users mailing list archive at
> > >> Nabble.com.
> > >> >> >>> > >>
> > >> >> >>> > >>
> > >> >> >>> > >>
> > >> >> >>> > >> --
> > >> >> >>> > >> Claus Ibsen
> > >> >> >>> > >> -----------------
> > >> >> >>> > >> Red Hat, Inc.
> > >> >> >>> > >> FuseSource is now part of Red Hat
> > >> >> >>> > >> Email: [hidden email]<
> > >> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> > >> >> >>> > >> Web: http://fusesource.com
> > >> >> >>> > >> Twitter: davsclaus
> > >> >> >>> > >> Blog: http://davsclaus.com
> > >> >> >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
> > >> >> >>> > >>
> > >> >> >>> > >>
> > >> >> >>> > >> ------------------------------
> > >> >> >>> > >> If you reply to this email, your message will be added to
> > the
> > >> >> >>> > discussion
> > >> >> >>> > >> below:
> > >> >> >>> > >>
> > >> >> >>> > >>
> > >> >> >>> >
> > >> >> >>> > >> .
> > >> >> >>> > >> 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
> > >> >> >>> >
> > >> >> >>> >
> > >> >> >>> > >>
> > >> >> >>> > >
> > >> >> >>> > >
> > >> >> >>> > >
> > >> >> >>> > > --
> > >> >> >>> > > Thanks & Regards
> > >> >> >>> > > Prabu.N
> > >> >> >>> > >
> > >> >> >>> > >
> > >> >> >>> > >
> > >> >> >>> > >
> > >> >> >>> > > --
> > >> >> >>> > > View this message in context:
> > >> >> >>> >
> > >> >> >>>
> > >> >>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> > >> >> >>> >
> > >> >> >>> > > Sent from the Camel - Users mailing list archive at
> > >> Nabble.com.
> > >> >> >>> >
> > >> >> >>> >
> > >> >> >>> >
> > >> >> >>> > ------------------------------
> > >> >> >>> >  If you reply to this email, your message will be added to
> the
> > >> >> discussion
> > >> >> >>> > below:
> > >> >> >>> >
> > >> >> >>> >
> > >> >> >>>
> > >> >>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> > >> >> >>> >  To unsubscribe from Camel routing issue, 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
> > >> >> >>> >
> > >> >> >>> >
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>> --
> > >> >> >>> Thanks & Regards
> > >> >> >>>  Prabu.N
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>>
> > >> >> >>> --
> > >> >> >>> View this message in context:
> > >> >> >>>
> > >> >>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> > >> >> >>> Sent from the Camel - Users mailing list archive at
> Nabble.com.
> > >> >> >>>
> > >> >> >>
> > >> >> >>
> > >> >> >>
> > >> >> >> --
> > >> >> >> Claus Ibsen
> > >> >> >> -----------------
> > >> >> >> Red Hat, Inc.
> > >> >> >> FuseSource is now part of Red Hat
> > >> >> >> Email: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=7>
> > >> >> >> Web: http://fusesource.com
> > >> >> >> Twitter: davsclaus
> > >> >> >> Blog: http://davsclaus.com
> > >> >> >> Author of Camel in Action: http://www.manning.com/ibsen
> > >> >>
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > Claus Ibsen
> > >> > -----------------
> > >> > Red Hat, Inc.
> > >> > FuseSource is now part of Red Hat
> > >> > Email: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=8>
> > >> > Web: http://fusesource.com
> > >> > Twitter: davsclaus
> > >> > Blog: http://davsclaus.com
> > >> > Author of Camel in Action: http://www.manning.com/ibsen
> > >>
> > >>
> > >> ------------------------------
> > >>  If you reply to this email, your message will be added to the
> > >> discussion below:
> > >>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
>
> > >>  To unsubscribe from Camel routing issue, 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
> > >
> > >>
> > >
> > >
> > >
> > > --
> > > Thanks & Regards
> > >  Prabu.N
> > >
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730195&i=4>
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730195.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730196.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

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

You should static import those methods: and, or
on the class org.apache.camel.builder.PredicateBuilder
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/builder/PredicateBuilder.html



On Tue, Apr 2, 2013 at 10:17 AM, prabumca06@gmail.com
<pr...@gmail.com>wrote:

> I have found solution in internet using Predicate  we can achieve this,
>
> But,one doubt in the link
> http://camel.apache.org/predicate.html,Theymentioned that we can use
> AND and OR in Predicate
>
> I have added below code in project,But i am getting compilation
> error.Please kindly help
>
> *Predicate god = and(admin, or(body().contains("Camel Rider"),
> header("type").isEqualTo("god")));*
>
> *Thanks*
> Prabu.N
>
>
> On Mon, Apr 1, 2013 at 9:05 PM, Prabu <pr...@gmail.com> wrote:
>
> > Hi *Chris / **Claus*,
> >
> > I have one *Inbound* queue,based on header and content type,I want
> > forward to outbound queue.
> > *
> > Example 1:
> > *
> > *
> > Inbound.queue name : **Inbound.Test.DDD
> > Outbound.queue name : SOURHQueueName
> >
> > *
> > *Criteria or Condition :
> > *
> > Message property *PAST_EVENT_INTERVAL type* is : *0*
> >    *AND*
> > Message *Type* value is : *card.test *or* card.expiry.test*
> >
> > *Example 2:*
> >
> > *Inbound.queue name : **Inbound.Test.SSS
> > Outbound.queue name : WESTQueueName
> > *
> > *Criteria or Condition :*
> > Message property *PAST_EVENT_INTERVAL type* is : *0*
> >  *AND
> > *
> > Message *Type *value *start with* :*card.event*
> >
> > I want achieve this using camel routing java DSL.
> >
> > Please help me.How can i use AND,OR and regular expression in camel
> routing
> >
> > *Regards*
> > Prabu.N
> >
> >
> > On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
> > ml-node+s465427n5730166h48@n5.nabble.com> wrote:
> >
> >> Hi Claus,
> >>
> >> Thanks for the response - I could not see any obvious way to configure
> >> an FTP Consumer at ***runtime***,
> >> either via bean, processor or consumer template.  If you have a
> >> concrete example, that would be great to see...
> >>
> >> ...otherwise, here's the solution I came up with:
> >>
> >>
> >>     -Chris
> >>
> >>
> >>
> >>   // simulate incoming message from JMS...
> >>   from("timer:kickoff?repeatCount=1")
> >>   .to("direct:start");
> >>
> >>   // upon receipt of FTP config from JMS, invoke  FtpConfigurer bean
> >> to reconfigure
> >>   // FTP route, then start it...
> >>   from("direct:start")
> >>   .beanRef("configRdr") // config reader bean not shown here
> >>   .convertBodyTo(Document.class)
> >>   // sets a bunch of headers from DOM, e.g.:
> >>
> >>
> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
> >>
> >> String.class)
> >>   .setHeader("ftp-route-id", constant("ftp.route"))
> >>   .beanRef("ftpConfigurer");
> >>
> >>   // FTP route will only be started by FtpConfigurer bean after it's
> >> dynamically re-configured...
> >>   from("ftp://bogushost/bogusdir?startScheduler=false") // the  URI
> >> will be reconfigured...
> >>   .routeId("ftp.route").noAutoStartup()
> >>   .log("Received file ${file:onlyname}")
> >>   .to("file:/tmp/local/data");
> >>
> >>   public class FtpConfigurer {
> >>     public void configureFtpConsumer(Exchange exchange) throws Exception
> >> {
> >>         CamelContext context = exchange.getContext();
> >>         Map<String, Object> headers = exchange.getIn().getHeaders();
> >>         Map<String, Object> parameters = new HashMap<String, Object>();
> >>
> >>         // Filter headers for ftp-config specific headers...
> >>         for (Map.Entry<String, Object> entry : headers.entrySet()) {
> >>             String key = entry.getKey();
> >>             if (key.startsWith("ftp-config."))
> >>                 parameters.put(key.substring("ftp-config.".length()),
> >> entry.getValue());
> >>         }
> >>
> >>         String routeId = exchange.getIn().getHeader("ftp-route-id",
> >> String.class);
> >>         Route ftpRoute = context.getRoute(routeId);
> >>         FtpConsumer c = (FtpConsumer) ftpRoute.getConsumer();
> >>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
> >> c.getEndpoint();
> >>         FtpConfiguration rfc = rfe.getConfiguration();
> >>
> >>         // Need to crack open FtpConsumer's "endpointPath" field since
> >>         // there's no mutator (setter)
> >>         Class<?> cls = c.getClass();
> >>         Field endpointPath_fld = cls.getDeclaredField("endpointPath");
> >>         endpointPath_fld.setAccessible(true);
> >>         endpointPath_fld.set(c, (String)parameters.get("directory"));
> >>
> >>         // Need to crack open FtpEndpoint, actually DefaultEndpoint -
> >> the ultimate base class
> >>         // since there's no mutator (setter) for the "endpointUri" field
> >>         cls = rfe.getClass();
> >>         Field endpointUri_fld = null;
> >>         while (endpointUri_fld == null) {
> >>             // TODO: maybe change logic to just stop at
> >> class=DefaultEndpoint
> >>             // rather then using NoSuchFieldException
> >>             try {
> >>                 endpointUri_fld = cls.getDeclaredField("endpointUri");
> >>             } catch (NoSuchFieldException nsfe) {
> >>                 cls = cls.getSuperclass();
> >>             }
> >>         }
> >>         endpointUri_fld.setAccessible(true);
> >>         endpointUri_fld.set(rfe,
> >>             String.format("ftp://%s/%s",
> >> (String)parameters.get("host"), (String)parameters.get("directory")));
> >>
> >>         // set reference properties first as they use # syntax that
> >> fools the regular properties setter
> >>         EndpointHelper.setReferenceProperties(context, rfc, parameters);
> >>         EndpointHelper.setProperties(context, rfc, parameters);
> >>         EndpointHelper.setReferenceProperties(context, rfe, parameters);
> >>         EndpointHelper.setProperties(context, rfe, parameters);
> >>         c.setStartScheduler(true);
> >>
> >>         context.startRoute(routeId);
> >>   }
> >> }
> >>
> >> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=0>>
> >> wrote:
> >>
> >> > Hi
> >> >
> >> > See this EIP
> >> > http://camel.apache.org/content-enricher.html
> >> >
> >> > About pollEnrich.
> >> >
> >> > Though pollEnrich currently does support dynamic uris. Its on the
> >> roadmap,
> >> > for Camel 3.0.
> >> > It requires an API change and thus isn't so easy to implement
> currently
> >> on
> >> > 2.x.
> >> >
> >> > You can always use a java bean / camel processor, and consume the ftp
> >> file
> >> > from java code.
> >> > For example using consumer template.
> >> >
> >> > As you use FTP you may want to set disconnect=true so the connect is
> >> not
> >> > remained open after usage.
> >> >
> >> >
> >> >
> >> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=1>>
> >> wrote:
> >> >
> >> >> Ok, I'm starting to get it - a little bit.  As for my concrete
> >> >> example, so far, I have:
> >> >>
> >> >>                 from("direct:start")
> >> >>                 .beanRef("config")
> >> >>                 .convertBodyTo(Document.class)
> >> >>                 .recipientList().xquery(
> >> >>                     "concat('ftp://'" +
> >> >>
> >> ",//remote[vendorId/@value='CBOE34']/server/@value" +
> >> >>
> >> >>
> >> >>
> >>
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
> >>
> >> >> +
> >> >>                     ",'?noop=true&amp;username='" +
> >> >>
> >> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> >> >>                     ",'&amp;password='" +
> >> >>
> >> >> ",//remote[vendorId/@value='CBOE34']/password/@value)",
> String.class);
> >> >>
> >> >> Here's the problem - this will create an FTP Producer - that's not
> >> >> what I need.  I need a dynamically
> >> >> constructed URI for a polling FTP consumer.  I don't think
> >> >> "recipientList" will work...   Any ideas?
> >> >>
> >> >> Thanks,
> >> >>
> >> >> Chris
> >> >>
> >> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
> >> wrote:
> >> >> > Hi Claus,
> >> >> >
> >> >> > I hate to ask this - but I still don't get it.  I thought
> >> >> > "recipientList" was for sending to multiple, runtime-defined
> >> >> > recipients.  I don't see how this
> >> >> > answers the question of sending to one, single recipient, whose URI
> >> is
> >> >> > dynamically constructed - and in my use-case the dynamic settings
> >> >> > are not in properties - so "simple" (property place-holders) won't
> >> help
> >> >> me.
> >> >> >
> >> >> > Let me give you a concrete example.  I need to do an ftp download
> >> and
> >> >> > the connection information comes from up-stream in the route in the
> >> >> > form of XML (DOM - a Document instance).  Currently, I am trying to
> >> do
> >> >> > this with bean binding and method params decorated with @XPath
> >> >> > pointing into the Document with the ftp settings and inside the
> >> >> > this method doing:
> >> >> >
> >> >> > FtpComponent ftpComponent = context.getComponent("ftp",
> >> >> FtpComponent.class);
> >> >> >
> >> >> > ..and then attempt to get the endpoint and call
> createConsumer(...).
> >> >> > I'm sure this is not the right way to do it, but I don't see how
> >> else
> >> >> > - any ideas?
> >> >> >
> >> >> > Thanks,
> >> >> >
> >> >> >
> >> >> > Chris
> >> >> >
> >> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
> >>
> >> >> wrote:
> >> >> >> Hi
> >> >> >>
> >> >> >> See this FAQ
> >> >> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=4>
> >> >> >> <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
> >>
> >> >> >>
> >> >> >>> Thanks Walzer..
> >> >> >>> *
> >> >> >>> *
> >> >> >>> *Queston1:
> >> >> >>>
> >> >> >>> *
> >> >> >>> *Example*
> >> >> >>>
> >> >> >>> .when(header("foo").isEqualTo("bar"))
> >> >> >>>                     .to("direct:b")
> >> >> >>>
> >> >> >>> In my case i have to add more than 80 condition and forwards to
> 80
> >> >> >>> different queues.
> >> >> >>>
> >> >> >>> Above example i can only hard-code queue name,But what i want is
> >> below.
> >> >> >>>
> >> >> >>> * .when(header("Type").isNotNull())
> >> >> >>>     .to("activemq.Inbound."+header("Type"))
> >> >> >>> *
> >> >> >>>
> >> >> >>> Example:If queue type is test,It should forward to *Inbound.test*
> >> >> queue.
> >> >> >>>
> >> >> >>> Above example i tried,but it did not worked,created queue
> >> something
> >> >> >>> like this *Inbound.header("type")*
> >> >> >>>
> >> >> >>> *Question2*:
> >> >> >>>
> >> >> >>> from("direct:a")
> >> >> >>>             .multicast().to("direct:b", "direct:c", "direct:d");
> >> >> >>>
> >> >> >>> Based on messages header and content type i want forward to
> >> different
> >> >> >>> queue.
> >> >> >>>
> >> >> >>> condition will be *OR *and *AND*.How can i do that like above
> >> example.*
> >> >> >>> *
> >> >> >>>
> >> >> >>> Thanks in advance*
> >> >> >>> *
> >> >> >>>
> >> >> >>> *Regards*
> >> >> >>>
> >> >> >>> Prabu.N
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
> >> >> >>> [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
> >> wrote:
> >> >> >>>
> >> >> >>> > Hi,
> >> >> >>> >
> >> >> >>> > you could start by reading Claus´ book (p. 44ff) which has a
> >> perfect
> >> >> >>> > example or http://camel.apache.org/content-based-router.html(just
> >>
> >> >> >>> > replace the direct: with your queues).
> >> >> >>> > If you need to fire your messages to multiple queues:
> >> >> >>> > http://camel.apache.org/publish-subscribe-channel.html shows
> >> you the
> >> >> >>> > various ways.
> >> >> >>> > When you get the concepts you can just "lego" them together.
> >> >> >>> >
> >> >> >>> > Regards, Thomas.
> >> >> >>> >
> >> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> >> >> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> >> >> >>> > <[hidden email] <
> >> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> >> >> >>> >
> >> >> >>> > > Hi Claus,
> >> >> >>> > >
> >> >> >>> > > Thanks so much Clus for help.It is working now.
> >> >> >>> > >
> >> >> >>> > > I need your guidance for the following requirement.
> >> >> >>> > >
> >> >> >>> > > 1.I have one *inbound queue* it will receive message
> >> frequently
> >> >> from my
> >> >> >>> > > application.
> >> >> >>> > > 2.From *inbound queue* i need camel routing to move message
> >> from
> >> >> >>> > > another *message
> >> >> >>> > > based inbound queue* based on message header value.
> >> >> >>> > > 3.From *message based inbound queue *i* *need camel routing
> to
> >> move
> >> >> >>> > message
> >> >> >>> > > to *one or more outbound queue *based on message content*
> >> >> >>> > > *
> >> >> >>> > >
> >> >> >>> > > I need *camel java DSL*sample code for above requirement.*
> >> >> >>> > > *
> >> >> >>> > > *
> >> >> >>> > > *
> >> >> >>> > > *Thanks in advance*
> >> >> >>> > >
> >> >> >>> > >
> >> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
> >> >> >>> > > [hidden email] <
> >> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> >> >> >>> > wrote:
> >> >> >>> > >
> >> >> >>> > >> Hi
> >> >> >>> > >>
> >> >> >>> > >> Do as the exception tells you. Check route 2. You route from
> >> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
> >> >> >>> > >>
> >> >> >>> > >> Maybe you need to add "activemq:" as prefix so its
> >> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
> >> >> >>> > >>
> >> >> >>> > >>
> >> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> >> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> >> >> >>> > >> <[hidden email] <
> >> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> >> >> >>> >>
> >> >> >>> >
> >> >> >>> > >> wrote:
> >> >> >>> > >>
> >> >> >>> > >>>
> >> >> >>> > >>> I have activemmq  Project in that i have following
> >> requirement
> >> >> >>> > >>>
> >> >> >>> > >>> 1.Move message from Inbound queue to type based inbound
> >> queue.
> >> >> >>> > >>> 2.Move message from Message type inbound queue to outbound
> >> queue
> >> >> >>> > >>>
> >> >> >>> > >>> I have created two bean for to achieve this.
> >> >> >>> > >>>
> >> >> >>> > >>> 1.one for move from inbound to message type  inbound queue
> >> >> >>> > >>> 2.one for move from inbound to outbound queue.
> >> >> >>> > >>>
> >> >> >>> > >>> I have following entry in camel.xml
> >> >> >>> > >>>
> >> >> >>> > >>>   <camelContext id="camel" xmlns="
> >> >> >>> > http://camel.apache.org/schema/spring">
> >> >> >>> > >>
> >> >> >>> > >>>
> >> >> >>> > >>>                <routeBuilder ref="routeBuilder" />
> >> >> >>> > >>>            <routeBuilder ref="routeBuilder1" />
> >> >> >>> > >>>
> >> >> >>> > >>>    </camelContext>
> >> >> >>> > >>>
> >> >> >>> > >>>    <bean id="routeBuilder"
> >> >> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> >> >> >>> > >>>    <bean id="recipientsGenerator"
> >> >> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> >> >> >>> > >>>    <bean id="routeBuilder1"
> >> >> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
> >> >> >>> > >>>    <bean id="recipientsGenerator1"
> >> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> >> >> >>> > >>>
> >> >> >>> > >>> When i run application i am getting following error.
> >> >> >>> > >>>
> >> >> >>> > >>> * java.lang.Exception:
> >> org.apache.camel.RuntimeCamelException:
> >> >> >>> > >>> org.apache.camel.Fa
> >> >> >>> > >>> iledToCreateRouteException: Failed to create route route2:
> >> >> >>> > >>> Route[[From[Inbound.G
> >> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No
> >> endpoint
> >> >> >>> > could
> >> >> >>> > >> be
> >> >> >>> > >>> found
> >> >> >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath
> >> contains
> >> >> the
> >> >> >>> > >> needed
> >> >> >>> > >>> Cam
> >> >> >>> > >>> el component jar.*
> >> >> >>> > >>>
> >> >> >>> > >>> I am not sure i am missing any configuration,Please kindly
> >> help
> >> >> me
> >> >> >>> > >>>
> >> >> >>> > >>>
> >> >> >>> > >>>
> >> >> >>> > >>>
> >> >> >>> > >>> --
> >> >> >>> > >>> View this message in context:
> >> >> >>> > >>
> >> >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> >> >> >>> > >>> Sent from the Camel - Users mailing list archive at
> >> Nabble.com.
> >> >> >>> > >>
> >> >> >>> > >>
> >> >> >>> > >>
> >> >> >>> > >> --
> >> >> >>> > >> Claus Ibsen
> >> >> >>> > >> -----------------
> >> >> >>> > >> Red Hat, Inc.
> >> >> >>> > >> FuseSource is now part of Red Hat
> >> >> >>> > >> Email: [hidden email]<
> >> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> >> >> >>> > >> Web: http://fusesource.com
> >> >> >>> > >> Twitter: davsclaus
> >> >> >>> > >> Blog: http://davsclaus.com
> >> >> >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
> >> >> >>> > >>
> >> >> >>> > >>
> >> >> >>> > >> ------------------------------
> >> >> >>> > >> If you reply to this email, your message will be added to
> the
> >> >> >>> > discussion
> >> >> >>> > >> below:
> >> >> >>> > >>
> >> >> >>> > >>
> >> >> >>> >
> >> >> >>> > >> .
> >> >> >>> > >> 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
> >> >> >>> >
> >> >> >>> >
> >> >> >>> > >>
> >> >> >>> > >
> >> >> >>> > >
> >> >> >>> > >
> >> >> >>> > > --
> >> >> >>> > > Thanks & Regards
> >> >> >>> > > Prabu.N
> >> >> >>> > >
> >> >> >>> > >
> >> >> >>> > >
> >> >> >>> > >
> >> >> >>> > > --
> >> >> >>> > > View this message in context:
> >> >> >>> >
> >> >> >>>
> >> >>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> >> >> >>> >
> >> >> >>> > > Sent from the Camel - Users mailing list archive at
> >> Nabble.com.
> >> >> >>> >
> >> >> >>> >
> >> >> >>> >
> >> >> >>> > ------------------------------
> >> >> >>> >  If you reply to this email, your message will be added to the
> >> >> discussion
> >> >> >>> > below:
> >> >> >>> >
> >> >> >>> >
> >> >> >>>
> >> >>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> >> >> >>> >  To unsubscribe from Camel routing issue, 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
> >> >> >>> >
> >> >> >>> >
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>> --
> >> >> >>> Thanks & Regards
> >> >> >>>  Prabu.N
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>> --
> >> >> >>> View this message in context:
> >> >> >>>
> >> >>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> >> >> >>> Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >> >>>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Claus Ibsen
> >> >> >> -----------------
> >> >> >> Red Hat, Inc.
> >> >> >> FuseSource is now part of Red Hat
> >> >> >> Email: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=7>
> >> >> >> Web: http://fusesource.com
> >> >> >> Twitter: davsclaus
> >> >> >> Blog: http://davsclaus.com
> >> >> >> Author of Camel in Action: http://www.manning.com/ibsen
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Claus Ibsen
> >> > -----------------
> >> > Red Hat, Inc.
> >> > FuseSource is now part of Red Hat
> >> > Email: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=8>
> >> > Web: http://fusesource.com
> >> > Twitter: davsclaus
> >> > Blog: http://davsclaus.com
> >> > Author of Camel in Action: http://www.manning.com/ibsen
> >>
> >>
> >> ------------------------------
> >>  If you reply to this email, your message will be added to the
> >> discussion below:
> >>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
> >>  To unsubscribe from Camel routing issue, click here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
> >
> >> .
> >> 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
> >
> >>
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel routing issue

Posted by Prabu <pr...@gmail.com>.
Hi Chris,

I used your code.But i am getting following compilation error

lder.java:92: cannot find symbol
symbol  : method setHeader(java.lang.String,java.lang.String)
location: class org.apache.camel.model.ChoiceDefinition
                  .otherwise().setHeader("MyHeader","sdfsdf")


*Note: *I am using camel 2.10 version



On Wed, Apr 3, 2013 at 8:22 PM, Chris Wolf <cw...@gmail.com> wrote:

> Hi Prabu,
>
> I don't mind helping, but could you continue to use the
> users@camel.apache.org rather then my private email?  That way, if
> other people have similar issues, they can benefit.
>
>
>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>            .otherwise()
>            .setHeader("MyHeader", constant("some-value"))  // <=== Set
> Header
>            .to(ERQ_QNAME)
>    .end();
>
> This technique will use the "simple" language function "constant" to
> set a string constant value.
> If the value you need to set is dynamic, then you could use a
> property placeholder.
>
>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>            .otherwise()
>            .setHeader("MyHeader", constant("{{some-prop}}"))  // <=== Set
> Header
>            .to(ERQ_QNAME)
>    .end();
>
> There are even more sophisticated ways to acquire dynamic values:
>
> http://camel.apache.org/python.html
>
> Regards,
>
> Chris
>
> On Wed, Apr 3, 2013 at 9:52 AM, Prabu <pr...@gmail.com> wrote:
> > I have code like this,
> >
> >     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice()
> >           .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> >           .otherwise().to(ERQ_QNAME)
> >    .end();
> >
> >     from(DEACTIVATIN_TYPE_SPECIFIC_QNAME).choice()
> >           .when(ALERT_FAILURE_HANDLER_PREDICATE).to(ALERT_FAILURE_QNAME)
> >           .otherwise().to(ERQ_QNAME)
> >     .end();
> >
> > I want to set some values to header inside otherwise that is before
> message
> > move to ERQ_QNAME.
> >
> > please kindly help me how to do that.
> >
> > Regards
> > Prabu.N
> >
> >
> > On Tue, Apr 2, 2013 at 10:52 PM, Prabu <pr...@gmail.com> wrote:
> >>
> >> No,i didn't received ...
> >>
> >> Regards
> >> Prabu.N
> >>
> >>
> >> On Tue, Apr 2, 2013 at 7:31 PM, Chris Wolf <cw...@gmail.com>
> wrote:
> >>>
> >>> Hi Prabu,
> >>>
> >>> Just out of curiosity - I am wondering if saw my email I sent
> >>> yesterday in response to your question?
> >>> I sent it to "users@camel.apache.org" with the subject,
> >>> "Content-based routing with Expressions and Predicates"...
> >>>
> >>> Regards,
> >>>
> >>> Chris
> >>>
> >>> On Tue, Apr 2, 2013 at 4:17 AM, prabumca06@gmail.com
> >>> <pr...@gmail.com> wrote:
> >>> > I have found solution in internet using Predicate  we can achieve
> this,
> >>> >
> >>> > But,one doubt in the link
> >>> > http://camel.apache.org/predicate.html,Theymentioned that we can use
> >>> > AND and OR in Predicate
> >>> >
> >>> > I have added below code in project,But i am getting compilation
> >>> > error.Please kindly help
> >>> >
> >>> > *Predicate god = and(admin, or(body().contains("Camel Rider"),
> >>> > header("type").isEqualTo("god")));*
> >>> >
> >>> > *Thanks*
> >>> > Prabu.N
> >>> >
> >>> >
> >>> > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <pr...@gmail.com> wrote:
> >>> >
> >>> >> Hi *Chris / **Claus*,
> >>> >>
> >>> >> I have one *Inbound* queue,based on header and content type,I want
> >>> >> forward to outbound queue.
> >>> >> *
> >>> >> Example 1:
> >>> >> *
> >>> >> *
> >>> >> Inbound.queue name : **Inbound.Test.DDD
> >>> >> Outbound.queue name : SOURHQueueName
> >>> >>
> >>> >> *
> >>> >> *Criteria or Condition :
> >>> >> *
> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
> >>> >>    *AND*
> >>> >> Message *Type* value is : *card.test *or* card.expiry.test*
> >>> >>
> >>> >> *Example 2:*
> >>> >>
> >>> >> *Inbound.queue name : **Inbound.Test.SSS
> >>> >> Outbound.queue name : WESTQueueName
> >>> >> *
> >>> >> *Criteria or Condition :*
> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
> >>> >>  *AND
> >>> >> *
> >>> >> Message *Type *value *start with* :*card.event*
> >>> >>
> >>> >> I want achieve this using camel routing java DSL.
> >>> >>
> >>> >> Please help me.How can i use AND,OR and regular expression in camel
> >>> >> routing
> >>> >>
> >>> >> *Regards*
> >>> >> Prabu.N
> >>> >>
> >>> >>
> >>> >> On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
> >>> >> ml-node+s465427n5730166h48@n5.nabble.com> wrote:
> >>> >>
> >>> >>> Hi Claus,
> >>> >>>
> >>> >>> Thanks for the response - I could not see any obvious way to
> >>> >>> configure
> >>> >>> an FTP Consumer at ***runtime***,
> >>> >>> either via bean, processor or consumer template.  If you have a
> >>> >>> concrete example, that would be great to see...
> >>> >>>
> >>> >>> ...otherwise, here's the solution I came up with:
> >>> >>>
> >>> >>>
> >>> >>>     -Chris
> >>> >>>
> >>> >>>
> >>> >>>
> >>> >>>   // simulate incoming message from JMS...
> >>> >>>   from("timer:kickoff?repeatCount=1")
> >>> >>>   .to("direct:start");
> >>> >>>
> >>> >>>   // upon receipt of FTP config from JMS, invoke  FtpConfigurer
> bean
> >>> >>> to reconfigure
> >>> >>>   // FTP route, then start it...
> >>> >>>   from("direct:start")
> >>> >>>   .beanRef("configRdr") // config reader bean not shown here
> >>> >>>   .convertBodyTo(Document.class)
> >>> >>>   // sets a bunch of headers from DOM, e.g.:
> >>> >>>
> >>> >>>
> >>> >>>
> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
> >>> >>>
> >>> >>> String.class)
> >>> >>>   .setHeader("ftp-route-id", constant("ftp.route"))
> >>> >>>   .beanRef("ftpConfigurer");
> >>> >>>
> >>> >>>   // FTP route will only be started by FtpConfigurer bean after
> it's
> >>> >>> dynamically re-configured...
> >>> >>>   from("ftp://bogushost/bogusdir?startScheduler=false") // the
>  URI
> >>> >>> will be reconfigured...
> >>> >>>   .routeId("ftp.route").noAutoStartup()
> >>> >>>   .log("Received file ${file:onlyname}")
> >>> >>>   .to("file:/tmp/local/data");
> >>> >>>
> >>> >>>   public class FtpConfigurer {
> >>> >>>     public void configureFtpConsumer(Exchange exchange) throws
> >>> >>> Exception
> >>> >>> {
> >>> >>>         CamelContext context = exchange.getContext();
> >>> >>>         Map<String, Object> headers =
> exchange.getIn().getHeaders();
> >>> >>>         Map<String, Object> parameters = new HashMap<String,
> >>> >>> Object>();
> >>> >>>
> >>> >>>         // Filter headers for ftp-config specific headers...
> >>> >>>         for (Map.Entry<String, Object> entry : headers.entrySet())
> {
> >>> >>>             String key = entry.getKey();
> >>> >>>             if (key.startsWith("ftp-config."))
> >>> >>>
> parameters.put(key.substring("ftp-config.".length()),
> >>> >>> entry.getValue());
> >>> >>>         }
> >>> >>>
> >>> >>>         String routeId = exchange.getIn().getHeader("ftp-route-id",
> >>> >>> String.class);
> >>> >>>         Route ftpRoute = context.getRoute(routeId);
> >>> >>>         FtpConsumer c = (FtpConsumer) ftpRoute.getConsumer();
> >>> >>>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
> >>> >>> c.getEndpoint();
> >>> >>>         FtpConfiguration rfc = rfe.getConfiguration();
> >>> >>>
> >>> >>>         // Need to crack open FtpConsumer's "endpointPath" field
> >>> >>> since
> >>> >>>         // there's no mutator (setter)
> >>> >>>         Class<?> cls = c.getClass();
> >>> >>>         Field endpointPath_fld =
> >>> >>> cls.getDeclaredField("endpointPath");
> >>> >>>         endpointPath_fld.setAccessible(true);
> >>> >>>         endpointPath_fld.set(c,
> (String)parameters.get("directory"));
> >>> >>>
> >>> >>>         // Need to crack open FtpEndpoint, actually
> DefaultEndpoint -
> >>> >>> the ultimate base class
> >>> >>>         // since there's no mutator (setter) for the "endpointUri"
> >>> >>> field
> >>> >>>         cls = rfe.getClass();
> >>> >>>         Field endpointUri_fld = null;
> >>> >>>         while (endpointUri_fld == null) {
> >>> >>>             // TODO: maybe change logic to just stop at
> >>> >>> class=DefaultEndpoint
> >>> >>>             // rather then using NoSuchFieldException
> >>> >>>             try {
> >>> >>>                 endpointUri_fld =
> >>> >>> cls.getDeclaredField("endpointUri");
> >>> >>>             } catch (NoSuchFieldException nsfe) {
> >>> >>>                 cls = cls.getSuperclass();
> >>> >>>             }
> >>> >>>         }
> >>> >>>         endpointUri_fld.setAccessible(true);
> >>> >>>         endpointUri_fld.set(rfe,
> >>> >>>             String.format("ftp://%s/%s",
> >>> >>> (String)parameters.get("host"),
> >>> >>> (String)parameters.get("directory")));
> >>> >>>
> >>> >>>         // set reference properties first as they use # syntax that
> >>> >>> fools the regular properties setter
> >>> >>>         EndpointHelper.setReferenceProperties(context, rfc,
> >>> >>> parameters);
> >>> >>>         EndpointHelper.setProperties(context, rfc, parameters);
> >>> >>>         EndpointHelper.setReferenceProperties(context, rfe,
> >>> >>> parameters);
> >>> >>>         EndpointHelper.setProperties(context, rfe, parameters);
> >>> >>>         c.setStartScheduler(true);
> >>> >>>
> >>> >>>         context.startRoute(routeId);
> >>> >>>   }
> >>> >>> }
> >>> >>>
> >>> >>> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden
> >>> >>> email]<http://user/SendEmail.jtp?type=node&node=5730166&i=0>>
> >>> >>> wrote:
> >>> >>>
> >>> >>> > Hi
> >>> >>> >
> >>> >>> > See this EIP
> >>> >>> > http://camel.apache.org/content-enricher.html
> >>> >>> >
> >>> >>> > About pollEnrich.
> >>> >>> >
> >>> >>> > Though pollEnrich currently does support dynamic uris. Its on the
> >>> >>> roadmap,
> >>> >>> > for Camel 3.0.
> >>> >>> > It requires an API change and thus isn't so easy to implement
> >>> >>> > currently
> >>> >>> on
> >>> >>> > 2.x.
> >>> >>> >
> >>> >>> > You can always use a java bean / camel processor, and consume the
> >>> >>> > ftp
> >>> >>> file
> >>> >>> > from java code.
> >>> >>> > For example using consumer template.
> >>> >>> >
> >>> >>> > As you use FTP you may want to set disconnect=true so the connect
> >>> >>> > is
> >>> >>> not
> >>> >>> > remained open after usage.
> >>> >>> >
> >>> >>> >
> >>> >>> >
> >>> >>> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden
> >>> >>> > email]<http://user/SendEmail.jtp?type=node&node=5730166&i=1>>
> >>> >>> wrote:
> >>> >>> >
> >>> >>> >> Ok, I'm starting to get it - a little bit.  As for my concrete
> >>> >>> >> example, so far, I have:
> >>> >>> >>
> >>> >>> >>                 from("direct:start")
> >>> >>> >>                 .beanRef("config")
> >>> >>> >>                 .convertBodyTo(Document.class)
> >>> >>> >>                 .recipientList().xquery(
> >>> >>> >>                     "concat('ftp://'" +
> >>> >>> >>
> >>> >>> ",//remote[vendorId/@value='CBOE34']/server/@value" +
> >>> >>> >>
> >>> >>> >>
> >>> >>> >>
> >>> >>>
> >>> >>>
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
> >>> >>>
> >>> >>> >> +
> >>> >>> >>                     ",'?noop=true&amp;username='" +
> >>> >>> >>
> >>> >>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> >>> >>> >>                     ",'&amp;password='" +
> >>> >>> >>
> >>> >>> >> ",//remote[vendorId/@value='CBOE34']/password/@value)",
> >>> >>> >> String.class);
> >>> >>> >>
> >>> >>> >> Here's the problem - this will create an FTP Producer - that's
> not
> >>> >>> >> what I need.  I need a dynamically
> >>> >>> >> constructed URI for a polling FTP consumer.  I don't think
> >>> >>> >> "recipientList" will work...   Any ideas?
> >>> >>> >>
> >>> >>> >> Thanks,
> >>> >>> >>
> >>> >>> >> Chris
> >>> >>> >>
> >>> >>> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden
> >>> >>> >> email]<http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
> >>> >>> wrote:
> >>> >>> >> > Hi Claus,
> >>> >>> >> >
> >>> >>> >> > I hate to ask this - but I still don't get it.  I thought
> >>> >>> >> > "recipientList" was for sending to multiple, runtime-defined
> >>> >>> >> > recipients.  I don't see how this
> >>> >>> >> > answers the question of sending to one, single recipient,
> whose
> >>> >>> >> > URI
> >>> >>> is
> >>> >>> >> > dynamically constructed - and in my use-case the dynamic
> >>> >>> >> > settings
> >>> >>> >> > are not in properties - so "simple" (property place-holders)
> >>> >>> >> > won't
> >>> >>> help
> >>> >>> >> me.
> >>> >>> >> >
> >>> >>> >> > Let me give you a concrete example.  I need to do an ftp
> >>> >>> >> > download
> >>> >>> and
> >>> >>> >> > the connection information comes from up-stream in the route
> in
> >>> >>> >> > the
> >>> >>> >> > form of XML (DOM - a Document instance).  Currently, I am
> trying
> >>> >>> >> > to
> >>> >>> do
> >>> >>> >> > this with bean binding and method params decorated with @XPath
> >>> >>> >> > pointing into the Document with the ftp settings and inside
> the
> >>> >>> >> > this method doing:
> >>> >>> >> >
> >>> >>> >> > FtpComponent ftpComponent = context.getComponent("ftp",
> >>> >>> >> FtpComponent.class);
> >>> >>> >> >
> >>> >>> >> > ..and then attempt to get the endpoint and call
> >>> >>> >> > createConsumer(...).
> >>> >>> >> > I'm sure this is not the right way to do it, but I don't see
> how
> >>> >>> else
> >>> >>> >> > - any ideas?
> >>> >>> >> >
> >>> >>> >> > Thanks,
> >>> >>> >> >
> >>> >>> >> >
> >>> >>> >> > Chris
> >>> >>> >> >
> >>> >>> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden
> >>> >>> >> > email]<http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
> >>> >>>
> >>> >>> >> wrote:
> >>> >>> >> >> Hi
> >>> >>> >> >>
> >>> >>> >> >> See this FAQ
> >>> >>> >> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> >>> >>> >> >>
> >>> >>> >> >>
> >>> >>> >> >>
> >>> >>> >> >>
> >>> >>> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden
> >>> >>> >> >> email]<http://user/SendEmail.jtp?type=node&node=5730166&i=4>
> >>> >>> >> >> <[hidden
> >>> >>> >> >> email]<http://user/SendEmail.jtp?type=node&node=5730166&i=5
> >>wrote:
> >>> >>>
> >>> >>> >> >>
> >>> >>> >> >>> Thanks Walzer..
> >>> >>> >> >>> *
> >>> >>> >> >>> *
> >>> >>> >> >>> *Queston1:
> >>> >>> >> >>>
> >>> >>> >> >>> *
> >>> >>> >> >>> *Example*
> >>> >>> >> >>>
> >>> >>> >> >>> .when(header("foo").isEqualTo("bar"))
> >>> >>> >> >>>                     .to("direct:b")
> >>> >>> >> >>>
> >>> >>> >> >>> In my case i have to add more than 80 condition and forwards
> >>> >>> >> >>> to 80
> >>> >>> >> >>> different queues.
> >>> >>> >> >>>
> >>> >>> >> >>> Above example i can only hard-code queue name,But what i
> want
> >>> >>> >> >>> is
> >>> >>> below.
> >>> >>> >> >>>
> >>> >>> >> >>> * .when(header("Type").isNotNull())
> >>> >>> >> >>>     .to("activemq.Inbound."+header("Type"))
> >>> >>> >> >>> *
> >>> >>> >> >>>
> >>> >>> >> >>> Example:If queue type is test,It should forward to
> >>> >>> >> >>> *Inbound.test*
> >>> >>> >> queue.
> >>> >>> >> >>>
> >>> >>> >> >>> Above example i tried,but it did not worked,created queue
> >>> >>> something
> >>> >>> >> >>> like this *Inbound.header("type")*
> >>> >>> >> >>>
> >>> >>> >> >>> *Question2*:
> >>> >>> >> >>>
> >>> >>> >> >>> from("direct:a")
> >>> >>> >> >>>             .multicast().to("direct:b", "direct:c",
> >>> >>> >> >>> "direct:d");
> >>> >>> >> >>>
> >>> >>> >> >>> Based on messages header and content type i want forward to
> >>> >>> different
> >>> >>> >> >>> queue.
> >>> >>> >> >>>
> >>> >>> >> >>> condition will be *OR *and *AND*.How can i do that like
> above
> >>> >>> example.*
> >>> >>> >> >>> *
> >>> >>> >> >>>
> >>> >>> >> >>> Thanks in advance*
> >>> >>> >> >>> *
> >>> >>> >> >>>
> >>> >>> >> >>> *Regards*
> >>> >>> >> >>>
> >>> >>> >> >>> Prabu.N
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel]
> <
> >>> >>> >> >>> [hidden
> >>> >>> >> >>> email]<http://user/SendEmail.jtp?type=node&node=5730166&i=6
> >>
> >>> >>> wrote:
> >>> >>> >> >>>
> >>> >>> >> >>> > Hi,
> >>> >>> >> >>> >
> >>> >>> >> >>> > you could start by reading Claus´ book (p. 44ff) which
> has a
> >>> >>> perfect
> >>> >>> >> >>> > example or
> http://camel.apache.org/content-based-router.html
> >>> >>> >> >>> > (just
> >>> >>>
> >>> >>> >> >>> > replace the direct: with your queues).
> >>> >>> >> >>> > If you need to fire your messages to multiple queues:
> >>> >>> >> >>> > http://camel.apache.org/publish-subscribe-channel.htmlshows
> >>> >>> you the
> >>> >>> >> >>> > various ways.
> >>> >>> >> >>> > When you get the concepts you can just "lego" them
> together.
> >>> >>> >> >>> >
> >>> >>> >> >>> > Regards, Thomas.
> >>> >>> >> >>> >
> >>> >>> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> >>> >>> >> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> >>> >>> >> >>> > <[hidden email] <
> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> >>> >>> >> >>> >
> >>> >>> >> >>> > > Hi Claus,
> >>> >>> >> >>> > >
> >>> >>> >> >>> > > Thanks so much Clus for help.It is working now.
> >>> >>> >> >>> > >
> >>> >>> >> >>> > > I need your guidance for the following requirement.
> >>> >>> >> >>> > >
> >>> >>> >> >>> > > 1.I have one *inbound queue* it will receive message
> >>> >>> frequently
> >>> >>> >> from my
> >>> >>> >> >>> > > application.
> >>> >>> >> >>> > > 2.From *inbound queue* i need camel routing to move
> >>> >>> >> >>> > > message
> >>> >>> from
> >>> >>> >> >>> > > another *message
> >>> >>> >> >>> > > based inbound queue* based on message header value.
> >>> >>> >> >>> > > 3.From *message based inbound queue *i* *need camel
> >>> >>> >> >>> > > routing to
> >>> >>> move
> >>> >>> >> >>> > message
> >>> >>> >> >>> > > to *one or more outbound queue *based on message
> content*
> >>> >>> >> >>> > > *
> >>> >>> >> >>> > >
> >>> >>> >> >>> > > I need *camel java DSL*sample code for above
> requirement.*
> >>> >>> >> >>> > > *
> >>> >>> >> >>> > > *
> >>> >>> >> >>> > > *
> >>> >>> >> >>> > > *Thanks in advance*
> >>> >>> >> >>> > >
> >>> >>> >> >>> > >
> >>> >>> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via
> Camel]
> >>> >>> >> >>> > > <
> >>> >>> >> >>> > > [hidden email] <
> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> >>> >>> >> >>> > wrote:
> >>> >>> >> >>> > >
> >>> >>> >> >>> > >> Hi
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >> Do as the exception tells you. Check route 2. You route
> >>> >>> >> >>> > >> from
> >>> >>> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >> Maybe you need to add "activemq:" as prefix so its
> >>> >>> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> >>> >>> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> >>> >>> >> >>> > >> <[hidden email] <
> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> >>> >>> >> >>> >>
> >>> >>> >> >>> >
> >>> >>> >> >>> > >> wrote:
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>> I have activemmq  Project in that i have following
> >>> >>> requirement
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>> 1.Move message from Inbound queue to type based
> inbound
> >>> >>> queue.
> >>> >>> >> >>> > >>> 2.Move message from Message type inbound queue to
> >>> >>> >> >>> > >>> outbound
> >>> >>> queue
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>> I have created two bean for to achieve this.
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>> 1.one for move from inbound to message type  inbound
> >>> >>> >> >>> > >>> queue
> >>> >>> >> >>> > >>> 2.one for move from inbound to outbound queue.
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>> I have following entry in camel.xml
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>>   <camelContext id="camel" xmlns="
> >>> >>> >> >>> > http://camel.apache.org/schema/spring">
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>>                <routeBuilder ref="routeBuilder" />
> >>> >>> >> >>> > >>>            <routeBuilder ref="routeBuilder1" />
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>>    </camelContext>
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>>    <bean id="routeBuilder"
> >>> >>> >> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator"
> >>> >>> >> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> >>> >>> >> >>> > >>>    <bean id="routeBuilder1"
> >>> >>> >> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator1"
> >>> >>> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>> When i run application i am getting following error.
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>> * java.lang.Exception:
> >>> >>> org.apache.camel.RuntimeCamelException:
> >>> >>> >> >>> > >>> org.apache.camel.Fa
> >>> >>> >> >>> > >>> iledToCreateRouteException: Failed to create route
> >>> >>> >> >>> > >>> route2:
> >>> >>> >> >>> > >>> Route[[From[Inbound.G
> >>> >>> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of
> No
> >>> >>> endpoint
> >>> >>> >> >>> > could
> >>> >>> >> >>> > >> be
> >>> >>> >> >>> > >>> found
> >>> >>> >> >>> > >>> for: Inbound.SSS.TestEvent, please check your
> classpath
> >>> >>> contains
> >>> >>> >> the
> >>> >>> >> >>> > >> needed
> >>> >>> >> >>> > >>> Cam
> >>> >>> >> >>> > >>> el component jar.*
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>> I am not sure i am missing any configuration,Please
> >>> >>> >> >>> > >>> kindly
> >>> >>> help
> >>> >>> >> me
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>>
> >>> >>> >> >>> > >>> --
> >>> >>> >> >>> > >>> View this message in context:
> >>> >>> >> >>> > >>
> >>> >>> >>
> >>> >>> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> >>> >>> >> >>> > >>> Sent from the Camel - Users mailing list archive at
> >>> >>> Nabble.com.
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >> --
> >>> >>> >> >>> > >> Claus Ibsen
> >>> >>> >> >>> > >> -----------------
> >>> >>> >> >>> > >> Red Hat, Inc.
> >>> >>> >> >>> > >> FuseSource is now part of Red Hat
> >>> >>> >> >>> > >> Email: [hidden email]<
> >>> >>> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> >>> >>> >> >>> > >> Web: http://fusesource.com
> >>> >>> >> >>> > >> Twitter: davsclaus
> >>> >>> >> >>> > >> Blog: http://davsclaus.com
> >>> >>> >> >>> > >> Author of Camel in Action:
> http://www.manning.com/ibsen
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >> ------------------------------
> >>> >>> >> >>> > >> If you reply to this email, your message will be added
> to
> >>> >>> >> >>> > >> the
> >>> >>> >> >>> > discussion
> >>> >>> >> >>> > >> below:
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >>
> >>> >>> >> >>> >
> >>> >>> >> >>> > >> .
> >>> >>> >> >>> > >> 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
> >>> >>> >> >>> >
> >>> >>> >> >>> >
> >>> >>> >> >>> > >>
> >>> >>> >> >>> > >
> >>> >>> >> >>> > >
> >>> >>> >> >>> > >
> >>> >>> >> >>> > > --
> >>> >>> >> >>> > > Thanks & Regards
> >>> >>> >> >>> > > Prabu.N
> >>> >>> >> >>> > >
> >>> >>> >> >>> > >
> >>> >>> >> >>> > >
> >>> >>> >> >>> > >
> >>> >>> >> >>> > > --
> >>> >>> >> >>> > > View this message in context:
> >>> >>> >> >>> >
> >>> >>> >> >>>
> >>> >>> >>
> >>> >>>
> >>> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> >>> >>> >> >>> >
> >>> >>> >> >>> > > Sent from the Camel - Users mailing list archive at
> >>> >>> Nabble.com.
> >>> >>> >> >>> >
> >>> >>> >> >>> >
> >>> >>> >> >>> >
> >>> >>> >> >>> > ------------------------------
> >>> >>> >> >>> >  If you reply to this email, your message will be added to
> >>> >>> >> >>> > the
> >>> >>> >> discussion
> >>> >>> >> >>> > below:
> >>> >>> >> >>> >
> >>> >>> >> >>> >
> >>> >>> >> >>>
> >>> >>> >>
> >>> >>>
> >>> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> >>> >>> >> >>> >  To unsubscribe from Camel routing issue, 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
> >>> >>> >> >>> >
> >>> >>> >> >>> >
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>> --
> >>> >>> >> >>> Thanks & Regards
> >>> >>> >> >>>  Prabu.N
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>>
> >>> >>> >> >>> --
> >>> >>> >> >>> View this message in context:
> >>> >>> >> >>>
> >>> >>> >>
> >>> >>>
> >>> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> >>> >>> >> >>> Sent from the Camel - Users mailing list archive at
> >>> >>> >> >>> Nabble.com.
> >>> >>> >> >>>
> >>> >>> >> >>
> >>> >>> >> >>
> >>> >>> >> >>
> >>> >>> >> >> --
> >>> >>> >> >> Claus Ibsen
> >>> >>> >> >> -----------------
> >>> >>> >> >> Red Hat, Inc.
> >>> >>> >> >> FuseSource is now part of Red Hat
> >>> >>> >> >> Email: [hidden
> >>> >>> >> >> email]<http://user/SendEmail.jtp?type=node&node=5730166&i=7>
> >>> >>> >> >> Web: http://fusesource.com
> >>> >>> >> >> Twitter: davsclaus
> >>> >>> >> >> Blog: http://davsclaus.com
> >>> >>> >> >> Author of Camel in Action: http://www.manning.com/ibsen
> >>> >>> >>
> >>> >>> >
> >>> >>> >
> >>> >>> >
> >>> >>> > --
> >>> >>> > Claus Ibsen
> >>> >>> > -----------------
> >>> >>> > Red Hat, Inc.
> >>> >>> > FuseSource is now part of Red Hat
> >>> >>> > Email: [hidden
> >>> >>> > email]<http://user/SendEmail.jtp?type=node&node=5730166&i=8>
> >>> >>> > Web: http://fusesource.com
> >>> >>> > Twitter: davsclaus
> >>> >>> > Blog: http://davsclaus.com
> >>> >>> > Author of Camel in Action: http://www.manning.com/ibsen
> >>> >>>
> >>> >>>
> >>> >>> ------------------------------
> >>> >>>  If you reply to this email, your message will be added to the
> >>> >>> discussion below:
> >>> >>>
> >>> >>>
> >>> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
> >>> >>>  To unsubscribe from Camel routing issue, click
> >>> >>> here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
> >
> >>> >>> .
> >>> >>>
> >>> >>> 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
> >
> >>> >>>
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> Thanks & Regards
> >>> >>  Prabu.N
> >>> >>
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Thanks & Regards
> >>> >  Prabu.N
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > View this message in context:
> >>> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
> >>> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >>
> >>
> >>
> >> --
> >> Thanks & Regards
> >>  Prabu.N
> >
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
I have found solution in internet using Predicate  we can achieve this,

But,one doubt in the link
http://camel.apache.org/predicate.html,Theymentioned that we can use
AND and OR in Predicate

I have added below code in project,But i am getting compilation
error.Please kindly help

*Predicate god = and(admin, or(body().contains("Camel Rider"),
header("type").isEqualTo("god")));*

*Thanks*
Prabu.N


On Mon, Apr 1, 2013 at 9:05 PM, Prabu <pr...@gmail.com> wrote:

> Hi *Chris / **Claus*,
>
> I have one *Inbound* queue,based on header and content type,I want
> forward to outbound queue.
> *
> Example 1:
> *
> *
> Inbound.queue name : **Inbound.Test.DDD
> Outbound.queue name : SOURHQueueName
>
> *
> *Criteria or Condition :
> *
> Message property *PAST_EVENT_INTERVAL type* is : *0*
>    *AND*
> Message *Type* value is : *card.test *or* card.expiry.test*
>
> *Example 2:*
>
> *Inbound.queue name : **Inbound.Test.SSS
> Outbound.queue name : WESTQueueName
> *
> *Criteria or Condition :*
> Message property *PAST_EVENT_INTERVAL type* is : *0*
>  *AND
> *
> Message *Type *value *start with* :*card.event*
>
> I want achieve this using camel routing java DSL.
>
> Please help me.How can i use AND,OR and regular expression in camel routing
>
> *Regards*
> Prabu.N
>
>
> On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
> ml-node+s465427n5730166h48@n5.nabble.com> wrote:
>
>> Hi Claus,
>>
>> Thanks for the response - I could not see any obvious way to configure
>> an FTP Consumer at ***runtime***,
>> either via bean, processor or consumer template.  If you have a
>> concrete example, that would be great to see...
>>
>> ...otherwise, here's the solution I came up with:
>>
>>
>>     -Chris
>>
>>
>>
>>   // simulate incoming message from JMS...
>>   from("timer:kickoff?repeatCount=1")
>>   .to("direct:start");
>>
>>   // upon receipt of FTP config from JMS, invoke  FtpConfigurer bean
>> to reconfigure
>>   // FTP route, then start it...
>>   from("direct:start")
>>   .beanRef("configRdr") // config reader bean not shown here
>>   .convertBodyTo(Document.class)
>>   // sets a bunch of headers from DOM, e.g.:
>>
>> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>>
>> String.class)
>>   .setHeader("ftp-route-id", constant("ftp.route"))
>>   .beanRef("ftpConfigurer");
>>
>>   // FTP route will only be started by FtpConfigurer bean after it's
>> dynamically re-configured...
>>   from("ftp://bogushost/bogusdir?startScheduler=false") // the  URI
>> will be reconfigured...
>>   .routeId("ftp.route").noAutoStartup()
>>   .log("Received file ${file:onlyname}")
>>   .to("file:/tmp/local/data");
>>
>>   public class FtpConfigurer {
>>     public void configureFtpConsumer(Exchange exchange) throws Exception
>> {
>>         CamelContext context = exchange.getContext();
>>         Map<String, Object> headers = exchange.getIn().getHeaders();
>>         Map<String, Object> parameters = new HashMap<String, Object>();
>>
>>         // Filter headers for ftp-config specific headers...
>>         for (Map.Entry<String, Object> entry : headers.entrySet()) {
>>             String key = entry.getKey();
>>             if (key.startsWith("ftp-config."))
>>                 parameters.put(key.substring("ftp-config.".length()),
>> entry.getValue());
>>         }
>>
>>         String routeId = exchange.getIn().getHeader("ftp-route-id",
>> String.class);
>>         Route ftpRoute = context.getRoute(routeId);
>>         FtpConsumer c = (FtpConsumer) ftpRoute.getConsumer();
>>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
>> c.getEndpoint();
>>         FtpConfiguration rfc = rfe.getConfiguration();
>>
>>         // Need to crack open FtpConsumer's "endpointPath" field since
>>         // there's no mutator (setter)
>>         Class<?> cls = c.getClass();
>>         Field endpointPath_fld = cls.getDeclaredField("endpointPath");
>>         endpointPath_fld.setAccessible(true);
>>         endpointPath_fld.set(c, (String)parameters.get("directory"));
>>
>>         // Need to crack open FtpEndpoint, actually DefaultEndpoint -
>> the ultimate base class
>>         // since there's no mutator (setter) for the "endpointUri" field
>>         cls = rfe.getClass();
>>         Field endpointUri_fld = null;
>>         while (endpointUri_fld == null) {
>>             // TODO: maybe change logic to just stop at
>> class=DefaultEndpoint
>>             // rather then using NoSuchFieldException
>>             try {
>>                 endpointUri_fld = cls.getDeclaredField("endpointUri");
>>             } catch (NoSuchFieldException nsfe) {
>>                 cls = cls.getSuperclass();
>>             }
>>         }
>>         endpointUri_fld.setAccessible(true);
>>         endpointUri_fld.set(rfe,
>>             String.format("ftp://%s/%s",
>> (String)parameters.get("host"), (String)parameters.get("directory")));
>>
>>         // set reference properties first as they use # syntax that
>> fools the regular properties setter
>>         EndpointHelper.setReferenceProperties(context, rfc, parameters);
>>         EndpointHelper.setProperties(context, rfc, parameters);
>>         EndpointHelper.setReferenceProperties(context, rfe, parameters);
>>         EndpointHelper.setProperties(context, rfe, parameters);
>>         c.setStartScheduler(true);
>>
>>         context.startRoute(routeId);
>>   }
>> }
>>
>> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=0>>
>> wrote:
>>
>> > Hi
>> >
>> > See this EIP
>> > http://camel.apache.org/content-enricher.html
>> >
>> > About pollEnrich.
>> >
>> > Though pollEnrich currently does support dynamic uris. Its on the
>> roadmap,
>> > for Camel 3.0.
>> > It requires an API change and thus isn't so easy to implement currently
>> on
>> > 2.x.
>> >
>> > You can always use a java bean / camel processor, and consume the ftp
>> file
>> > from java code.
>> > For example using consumer template.
>> >
>> > As you use FTP you may want to set disconnect=true so the connect is
>> not
>> > remained open after usage.
>> >
>> >
>> >
>> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=1>>
>> wrote:
>> >
>> >> Ok, I'm starting to get it - a little bit.  As for my concrete
>> >> example, so far, I have:
>> >>
>> >>                 from("direct:start")
>> >>                 .beanRef("config")
>> >>                 .convertBodyTo(Document.class)
>> >>                 .recipientList().xquery(
>> >>                     "concat('ftp://'" +
>> >>
>> ",//remote[vendorId/@value='CBOE34']/server/@value" +
>> >>
>> >>
>> >>
>> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>>
>> >> +
>> >>                     ",'?noop=true&amp;username='" +
>> >>
>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
>> >>                     ",'&amp;password='" +
>> >>
>> >> ",//remote[vendorId/@value='CBOE34']/password/@value)", String.class);
>> >>
>> >> Here's the problem - this will create an FTP Producer - that's not
>> >> what I need.  I need a dynamically
>> >> constructed URI for a polling FTP consumer.  I don't think
>> >> "recipientList" will work...   Any ideas?
>> >>
>> >> Thanks,
>> >>
>> >> Chris
>> >>
>> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
>> wrote:
>> >> > Hi Claus,
>> >> >
>> >> > I hate to ask this - but I still don't get it.  I thought
>> >> > "recipientList" was for sending to multiple, runtime-defined
>> >> > recipients.  I don't see how this
>> >> > answers the question of sending to one, single recipient, whose URI
>> is
>> >> > dynamically constructed - and in my use-case the dynamic settings
>> >> > are not in properties - so "simple" (property place-holders) won't
>> help
>> >> me.
>> >> >
>> >> > Let me give you a concrete example.  I need to do an ftp download
>> and
>> >> > the connection information comes from up-stream in the route in the
>> >> > form of XML (DOM - a Document instance).  Currently, I am trying to
>> do
>> >> > this with bean binding and method params decorated with @XPath
>> >> > pointing into the Document with the ftp settings and inside the
>> >> > this method doing:
>> >> >
>> >> > FtpComponent ftpComponent = context.getComponent("ftp",
>> >> FtpComponent.class);
>> >> >
>> >> > ..and then attempt to get the endpoint and call createConsumer(...).
>> >> > I'm sure this is not the right way to do it, but I don't see how
>> else
>> >> > - any ideas?
>> >> >
>> >> > Thanks,
>> >> >
>> >> >
>> >> > Chris
>> >> >
>> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
>>
>> >> wrote:
>> >> >> Hi
>> >> >>
>> >> >> See this FAQ
>> >> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=4>
>> >> >> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
>>
>> >> >>
>> >> >>> Thanks Walzer..
>> >> >>> *
>> >> >>> *
>> >> >>> *Queston1:
>> >> >>>
>> >> >>> *
>> >> >>> *Example*
>> >> >>>
>> >> >>> .when(header("foo").isEqualTo("bar"))
>> >> >>>                     .to("direct:b")
>> >> >>>
>> >> >>> In my case i have to add more than 80 condition and forwards to 80
>> >> >>> different queues.
>> >> >>>
>> >> >>> Above example i can only hard-code queue name,But what i want is
>> below.
>> >> >>>
>> >> >>> * .when(header("Type").isNotNull())
>> >> >>>     .to("activemq.Inbound."+header("Type"))
>> >> >>> *
>> >> >>>
>> >> >>> Example:If queue type is test,It should forward to *Inbound.test*
>> >> queue.
>> >> >>>
>> >> >>> Above example i tried,but it did not worked,created queue
>> something
>> >> >>> like this *Inbound.header("type")*
>> >> >>>
>> >> >>> *Question2*:
>> >> >>>
>> >> >>> from("direct:a")
>> >> >>>             .multicast().to("direct:b", "direct:c", "direct:d");
>> >> >>>
>> >> >>> Based on messages header and content type i want forward to
>> different
>> >> >>> queue.
>> >> >>>
>> >> >>> condition will be *OR *and *AND*.How can i do that like above
>> example.*
>> >> >>> *
>> >> >>>
>> >> >>> Thanks in advance*
>> >> >>> *
>> >> >>>
>> >> >>> *Regards*
>> >> >>>
>> >> >>> Prabu.N
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
>> >> >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
>> wrote:
>> >> >>>
>> >> >>> > Hi,
>> >> >>> >
>> >> >>> > you could start by reading Claus´ book (p. 44ff) which has a
>> perfect
>> >> >>> > example or http://camel.apache.org/content-based-router.html (just
>>
>> >> >>> > replace the direct: with your queues).
>> >> >>> > If you need to fire your messages to multiple queues:
>> >> >>> > http://camel.apache.org/publish-subscribe-channel.html shows
>> you the
>> >> >>> > various ways.
>> >> >>> > When you get the concepts you can just "lego" them together.
>> >> >>> >
>> >> >>> > Regards, Thomas.
>> >> >>> >
>> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>> >> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
>> >> >>> > <[hidden email] <
>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>> >> >>> >
>> >> >>> > > Hi Claus,
>> >> >>> > >
>> >> >>> > > Thanks so much Clus for help.It is working now.
>> >> >>> > >
>> >> >>> > > I need your guidance for the following requirement.
>> >> >>> > >
>> >> >>> > > 1.I have one *inbound queue* it will receive message
>> frequently
>> >> from my
>> >> >>> > > application.
>> >> >>> > > 2.From *inbound queue* i need camel routing to move message
>> from
>> >> >>> > > another *message
>> >> >>> > > based inbound queue* based on message header value.
>> >> >>> > > 3.From *message based inbound queue *i* *need camel routing to
>> move
>> >> >>> > message
>> >> >>> > > to *one or more outbound queue *based on message content*
>> >> >>> > > *
>> >> >>> > >
>> >> >>> > > I need *camel java DSL*sample code for above requirement.*
>> >> >>> > > *
>> >> >>> > > *
>> >> >>> > > *
>> >> >>> > > *Thanks in advance*
>> >> >>> > >
>> >> >>> > >
>> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
>> >> >>> > > [hidden email] <
>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>> >> >>> > wrote:
>> >> >>> > >
>> >> >>> > >> Hi
>> >> >>> > >>
>> >> >>> > >> Do as the exception tells you. Check route 2. You route from
>> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
>> >> >>> > >>
>> >> >>> > >> Maybe you need to add "activemq:" as prefix so its
>> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
>> >> >>> > >>
>> >> >>> > >>
>> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
>> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
>> >> >>> > >> <[hidden email] <
>> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
>> >> >>> >>
>> >> >>> >
>> >> >>> > >> wrote:
>> >> >>> > >>
>> >> >>> > >>>
>> >> >>> > >>> I have activemmq  Project in that i have following
>> requirement
>> >> >>> > >>>
>> >> >>> > >>> 1.Move message from Inbound queue to type based inbound
>> queue.
>> >> >>> > >>> 2.Move message from Message type inbound queue to outbound
>> queue
>> >> >>> > >>>
>> >> >>> > >>> I have created two bean for to achieve this.
>> >> >>> > >>>
>> >> >>> > >>> 1.one for move from inbound to message type  inbound queue
>> >> >>> > >>> 2.one for move from inbound to outbound queue.
>> >> >>> > >>>
>> >> >>> > >>> I have following entry in camel.xml
>> >> >>> > >>>
>> >> >>> > >>>   <camelContext id="camel" xmlns="
>> >> >>> > http://camel.apache.org/schema/spring">
>> >> >>> > >>
>> >> >>> > >>>
>> >> >>> > >>>                <routeBuilder ref="routeBuilder" />
>> >> >>> > >>>            <routeBuilder ref="routeBuilder1" />
>> >> >>> > >>>
>> >> >>> > >>>    </camelContext>
>> >> >>> > >>>
>> >> >>> > >>>    <bean id="routeBuilder"
>> >> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
>> >> >>> > >>>    <bean id="recipientsGenerator"
>> >> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
>> >> >>> > >>>    <bean id="routeBuilder1"
>> >> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
>> >> >>> > >>>    <bean id="recipientsGenerator1"
>> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
>> >> >>> > >>>
>> >> >>> > >>> When i run application i am getting following error.
>> >> >>> > >>>
>> >> >>> > >>> * java.lang.Exception:
>> org.apache.camel.RuntimeCamelException:
>> >> >>> > >>> org.apache.camel.Fa
>> >> >>> > >>> iledToCreateRouteException: Failed to create route route2:
>> >> >>> > >>> Route[[From[Inbound.G
>> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No
>> endpoint
>> >> >>> > could
>> >> >>> > >> be
>> >> >>> > >>> found
>> >> >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath
>> contains
>> >> the
>> >> >>> > >> needed
>> >> >>> > >>> Cam
>> >> >>> > >>> el component jar.*
>> >> >>> > >>>
>> >> >>> > >>> I am not sure i am missing any configuration,Please kindly
>> help
>> >> me
>> >> >>> > >>>
>> >> >>> > >>>
>> >> >>> > >>>
>> >> >>> > >>>
>> >> >>> > >>> --
>> >> >>> > >>> View this message in context:
>> >> >>> > >>
>> >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>> >> >>> > >>> Sent from the Camel - Users mailing list archive at
>> Nabble.com.
>> >> >>> > >>
>> >> >>> > >>
>> >> >>> > >>
>> >> >>> > >> --
>> >> >>> > >> Claus Ibsen
>> >> >>> > >> -----------------
>> >> >>> > >> Red Hat, Inc.
>> >> >>> > >> FuseSource is now part of Red Hat
>> >> >>> > >> Email: [hidden email]<
>> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
>> >> >>> > >> Web: http://fusesource.com
>> >> >>> > >> Twitter: davsclaus
>> >> >>> > >> Blog: http://davsclaus.com
>> >> >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
>> >> >>> > >>
>> >> >>> > >>
>> >> >>> > >> ------------------------------
>> >> >>> > >> If you reply to this email, your message will be added to the
>> >> >>> > discussion
>> >> >>> > >> below:
>> >> >>> > >>
>> >> >>> > >>
>> >> >>> >
>> >> >>> > >> .
>> >> >>> > >> 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
>> >> >>> >
>> >> >>> >
>> >> >>> > >>
>> >> >>> > >
>> >> >>> > >
>> >> >>> > >
>> >> >>> > > --
>> >> >>> > > Thanks & Regards
>> >> >>> > > Prabu.N
>> >> >>> > >
>> >> >>> > >
>> >> >>> > >
>> >> >>> > >
>> >> >>> > > --
>> >> >>> > > View this message in context:
>> >> >>> >
>> >> >>>
>> >>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>> >> >>> >
>> >> >>> > > Sent from the Camel - Users mailing list archive at
>> Nabble.com.
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> > ------------------------------
>> >> >>> >  If you reply to this email, your message will be added to the
>> >> discussion
>> >> >>> > below:
>> >> >>> >
>> >> >>> >
>> >> >>>
>> >>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>> >> >>> >  To unsubscribe from Camel routing issue, 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
>> >> >>> >
>> >> >>> >
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> --
>> >> >>> Thanks & Regards
>> >> >>>  Prabu.N
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> --
>> >> >>> View this message in context:
>> >> >>>
>> >>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>> >> >>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >> >>>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Claus Ibsen
>> >> >> -----------------
>> >> >> Red Hat, Inc.
>> >> >> FuseSource is now part of Red Hat
>> >> >> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=7>
>> >> >> Web: http://fusesource.com
>> >> >> Twitter: davsclaus
>> >> >> Blog: http://davsclaus.com
>> >> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >>
>> >
>> >
>> >
>> > --
>> > Claus Ibsen
>> > -----------------
>> > Red Hat, Inc.
>> > FuseSource is now part of Red Hat
>> > Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730166&i=8>
>> > Web: http://fusesource.com
>> > Twitter: davsclaus
>> > Blog: http://davsclaus.com
>> > Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by Chris Wolf <cw...@gmail.com>.
Hi Claus,

Thanks for the response - I could not see any obvious way to configure
an FTP Consumer at ***runtime***,
either via bean, processor or consumer template.  If you have a
concrete example, that would be great to see...

...otherwise, here's the solution I came up with:


    -Chris



  // simulate incoming message from JMS...
  from("timer:kickoff?repeatCount=1")
  .to("direct:start");

  // upon receipt of FTP config from JMS, invoke  FtpConfigurer bean
to reconfigure
  // FTP route, then start it...
  from("direct:start")
  .beanRef("configRdr") // config reader bean not shown here
  .convertBodyTo(Document.class)
  // sets a bunch of headers from DOM, e.g.:
  .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
String.class)
  .setHeader("ftp-route-id", constant("ftp.route"))
  .beanRef("ftpConfigurer");

  // FTP route will only be started by FtpConfigurer bean after it's
dynamically re-configured...
  from("ftp://bogushost/bogusdir?startScheduler=false") // the  URI
will be reconfigured...
  .routeId("ftp.route").noAutoStartup()
  .log("Received file ${file:onlyname}")
  .to("file:/tmp/local/data");

  public class FtpConfigurer {
    public void configureFtpConsumer(Exchange exchange) throws Exception {
        CamelContext context = exchange.getContext();
        Map<String, Object> headers = exchange.getIn().getHeaders();
        Map<String, Object> parameters = new HashMap<String, Object>();

        // Filter headers for ftp-config specific headers...
        for (Map.Entry<String, Object> entry : headers.entrySet()) {
            String key = entry.getKey();
            if (key.startsWith("ftp-config."))
                parameters.put(key.substring("ftp-config.".length()),
entry.getValue());
        }

        String routeId = exchange.getIn().getHeader("ftp-route-id",
String.class);
        Route ftpRoute = context.getRoute(routeId);
        FtpConsumer c = (FtpConsumer) ftpRoute.getConsumer();
        FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>) c.getEndpoint();
        FtpConfiguration rfc = rfe.getConfiguration();

        // Need to crack open FtpConsumer's "endpointPath" field since
        // there's no mutator (setter)
        Class<?> cls = c.getClass();
        Field endpointPath_fld = cls.getDeclaredField("endpointPath");
        endpointPath_fld.setAccessible(true);
        endpointPath_fld.set(c, (String)parameters.get("directory"));

        // Need to crack open FtpEndpoint, actually DefaultEndpoint -
the ultimate base class
        // since there's no mutator (setter) for the "endpointUri" field
        cls = rfe.getClass();
        Field endpointUri_fld = null;
        while (endpointUri_fld == null) {
            // TODO: maybe change logic to just stop at class=DefaultEndpoint
            // rather then using NoSuchFieldException
            try {
                endpointUri_fld = cls.getDeclaredField("endpointUri");
            } catch (NoSuchFieldException nsfe) {
                cls = cls.getSuperclass();
            }
        }
        endpointUri_fld.setAccessible(true);
        endpointUri_fld.set(rfe,
            String.format("ftp://%s/%s",
(String)parameters.get("host"), (String)parameters.get("directory")));

        // set reference properties first as they use # syntax that
fools the regular properties setter
        EndpointHelper.setReferenceProperties(context, rfc, parameters);
        EndpointHelper.setProperties(context, rfc, parameters);
        EndpointHelper.setReferenceProperties(context, rfe, parameters);
        EndpointHelper.setProperties(context, rfe, parameters);
        c.setStartScheduler(true);

        context.startRoute(routeId);
  }
}

On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> See this EIP
> http://camel.apache.org/content-enricher.html
>
> About pollEnrich.
>
> Though pollEnrich currently does support dynamic uris. Its on the roadmap,
> for Camel 3.0.
> It requires an API change and thus isn't so easy to implement currently on
> 2.x.
>
> You can always use a java bean / camel processor, and consume the ftp file
> from java code.
> For example using consumer template.
>
> As you use FTP you may want to set disconnect=true so the connect is not
> remained open after usage.
>
>
>
> On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <cw...@gmail.com> wrote:
>
>> Ok, I'm starting to get it - a little bit.  As for my concrete
>> example, so far, I have:
>>
>>                 from("direct:start")
>>                 .beanRef("config")
>>                 .convertBodyTo(Document.class)
>>                 .recipientList().xquery(
>>                     "concat('ftp://'" +
>>                     ",//remote[vendorId/@value='CBOE34']/server/@value" +
>>
>>
>> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>> +
>>                     ",'?noop=true&amp;username='" +
>>                     ",//remote[vendorId/@value='CBOE34']/username/@value" +
>>                     ",'&amp;password='" +
>>
>> ",//remote[vendorId/@value='CBOE34']/password/@value)", String.class);
>>
>> Here's the problem - this will create an FTP Producer - that's not
>> what I need.  I need a dynamically
>> constructed URI for a polling FTP consumer.  I don't think
>> "recipientList" will work...   Any ideas?
>>
>> Thanks,
>>
>> Chris
>>
>> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <cw...@gmail.com> wrote:
>> > Hi Claus,
>> >
>> > I hate to ask this - but I still don't get it.  I thought
>> > "recipientList" was for sending to multiple, runtime-defined
>> > recipients.  I don't see how this
>> > answers the question of sending to one, single recipient, whose URI is
>> > dynamically constructed - and in my use-case the dynamic settings
>> > are not in properties - so "simple" (property place-holders) won't help
>> me.
>> >
>> > Let me give you a concrete example.  I need to do an ftp download and
>> > the connection information comes from up-stream in the route in the
>> > form of XML (DOM - a Document instance).  Currently, I am trying to do
>> > this with bean binding and method params decorated with @XPath
>> > pointing into the Document with the ftp settings and inside the
>> > this method doing:
>> >
>> > FtpComponent ftpComponent = context.getComponent("ftp",
>> FtpComponent.class);
>> >
>> > ..and then attempt to get the endpoint and call createConsumer(...).
>> > I'm sure this is not the right way to do it, but I don't see how else
>> > - any ideas?
>> >
>> > Thanks,
>> >
>> >
>> > Chris
>> >
>> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <cl...@gmail.com>
>> wrote:
>> >> Hi
>> >>
>> >> See this FAQ
>> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> >>
>> >>
>> >>
>> >>
>> >> On Sun, Mar 31, 2013 at 5:22 AM, prabumca06@gmail.com
>> >> <pr...@gmail.com>wrote:
>> >>
>> >>> Thanks Walzer..
>> >>> *
>> >>> *
>> >>> *Queston1:
>> >>>
>> >>> *
>> >>> *Example*
>> >>>
>> >>> .when(header("foo").isEqualTo("bar"))
>> >>>                     .to("direct:b")
>> >>>
>> >>> In my case i have to add more than 80 condition and forwards to 80
>> >>> different queues.
>> >>>
>> >>> Above example i can only hard-code queue name,But what i want is below.
>> >>>
>> >>> * .when(header("Type").isNotNull())
>> >>>     .to("activemq.Inbound."+header("Type"))
>> >>> *
>> >>>
>> >>> Example:If queue type is test,It should forward to *Inbound.test*
>> queue.
>> >>>
>> >>> Above example i tried,but it did not worked,created queue something
>> >>> like this *Inbound.header("type")*
>> >>>
>> >>> *Question2*:
>> >>>
>> >>> from("direct:a")
>> >>>             .multicast().to("direct:b", "direct:c", "direct:d");
>> >>>
>> >>> Based on messages header and content type i want forward to different
>> >>> queue.
>> >>>
>> >>> condition will be *OR *and *AND*.How can i do that like above example.*
>> >>> *
>> >>>
>> >>> Thanks in advance*
>> >>> *
>> >>>
>> >>> *Regards*
>> >>>
>> >>> Prabu.N
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
>> >>> ml-node+s465427n5730116h98@n5.nabble.com> wrote:
>> >>>
>> >>> > Hi,
>> >>> >
>> >>> > you could start by reading Claus´ book (p. 44ff) which has a perfect
>> >>> > example or http://camel.apache.org/content-based-router.html (just
>> >>> > replace the direct: with your queues).
>> >>> > If you need to fire your messages to multiple queues:
>> >>> > http://camel.apache.org/publish-subscribe-channel.html shows you the
>> >>> > various ways.
>> >>> > When you get the concepts you can just "lego" them together.
>> >>> >
>> >>> > Regards, Thomas.
>> >>> >
>> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
>> >>> > <[hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>> >>> >
>> >>> > > Hi Claus,
>> >>> > >
>> >>> > > Thanks so much Clus for help.It is working now.
>> >>> > >
>> >>> > > I need your guidance for the following requirement.
>> >>> > >
>> >>> > > 1.I have one *inbound queue* it will receive message frequently
>> from my
>> >>> > > application.
>> >>> > > 2.From *inbound queue* i need camel routing to move message from
>> >>> > > another *message
>> >>> > > based inbound queue* based on message header value.
>> >>> > > 3.From *message based inbound queue *i* *need camel routing to move
>> >>> > message
>> >>> > > to *one or more outbound queue *based on message content*
>> >>> > > *
>> >>> > >
>> >>> > > I need *camel java DSL*sample code for above requirement.*
>> >>> > > *
>> >>> > > *
>> >>> > > *
>> >>> > > *Thanks in advance*
>> >>> > >
>> >>> > >
>> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
>> >>> > > [hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>> >>> > wrote:
>> >>> > >
>> >>> > >> Hi
>> >>> > >>
>> >>> > >> Do as the exception tells you. Check route 2. You route from
>> >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
>> >>> > >>
>> >>> > >> Maybe you need to add "activemq:" as prefix so its
>> >>> > >> "activemq:Inbound.SSS.TestEvent".
>> >>> > >>
>> >>> > >>
>> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
>> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
>> >>> > >> <[hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5730109&i=1
>> >>> >>
>> >>> >
>> >>> > >> wrote:
>> >>> > >>
>> >>> > >>>
>> >>> > >>> I have activemmq  Project in that i have following requirement
>> >>> > >>>
>> >>> > >>> 1.Move message from Inbound queue to type based inbound queue.
>> >>> > >>> 2.Move message from Message type inbound queue to outbound queue
>> >>> > >>>
>> >>> > >>> I have created two bean for to achieve this.
>> >>> > >>>
>> >>> > >>> 1.one for move from inbound to message type  inbound queue
>> >>> > >>> 2.one for move from inbound to outbound queue.
>> >>> > >>>
>> >>> > >>> I have following entry in camel.xml
>> >>> > >>>
>> >>> > >>>   <camelContext id="camel" xmlns="
>> >>> > http://camel.apache.org/schema/spring">
>> >>> > >>
>> >>> > >>>
>> >>> > >>>                <routeBuilder ref="routeBuilder" />
>> >>> > >>>            <routeBuilder ref="routeBuilder1" />
>> >>> > >>>
>> >>> > >>>    </camelContext>
>> >>> > >>>
>> >>> > >>>    <bean id="routeBuilder"
>> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
>> >>> > >>>    <bean id="recipientsGenerator"
>> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
>> >>> > >>>    <bean id="routeBuilder1"
>> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
>> >>> > >>>    <bean id="recipientsGenerator1"
>> >>> > >>> class="com.camel.routes.RecipientListBean"/>
>> >>> > >>>
>> >>> > >>> When i run application i am getting following error.
>> >>> > >>>
>> >>> > >>> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
>> >>> > >>> org.apache.camel.Fa
>> >>> > >>> iledToCreateRouteException: Failed to create route route2:
>> >>> > >>> Route[[From[Inbound.G
>> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No endpoint
>> >>> > could
>> >>> > >> be
>> >>> > >>> found
>> >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath contains
>> the
>> >>> > >> needed
>> >>> > >>> Cam
>> >>> > >>> el component jar.*
>> >>> > >>>
>> >>> > >>> I am not sure i am missing any configuration,Please kindly help
>> me
>> >>> > >>>
>> >>> > >>>
>> >>> > >>>
>> >>> > >>>
>> >>> > >>> --
>> >>> > >>> View this message in context:
>> >>> > >>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>> >>> > >>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>> > >>
>> >>> > >>
>> >>> > >>
>> >>> > >> --
>> >>> > >> Claus Ibsen
>> >>> > >> -----------------
>> >>> > >> Red Hat, Inc.
>> >>> > >> FuseSource is now part of Red Hat
>> >>> > >> Email: [hidden email]<
>> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
>> >>> > >> Web: http://fusesource.com
>> >>> > >> Twitter: davsclaus
>> >>> > >> Blog: http://davsclaus.com
>> >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
>> >>> > >>
>> >>> > >>
>> >>> > >> ------------------------------
>> >>> > >> If you reply to this email, your message will be added to the
>> >>> > discussion
>> >>> > >> below:
>> >>> > >>
>> >>> > >>
>> >>> >
>> >>> > >> .
>> >>> > >> 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
>> >>> >
>> >>> >
>> >>> > >>
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > > --
>> >>> > > Thanks & Regards
>> >>> > > Prabu.N
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > > --
>> >>> > > View this message in context:
>> >>> >
>> >>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>> >>> >
>> >>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>> >
>> >>> >
>> >>> >
>> >>> > ------------------------------
>> >>> >  If you reply to this email, your message will be added to the
>> discussion
>> >>> > below:
>> >>> >
>> >>> >
>> >>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>> >>> >  To unsubscribe from Camel routing issue, click here<
>> >>>
>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
>> >>> >
>> >>> > .
>> >>> > 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
>> >>> >
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Thanks & Regards
>> >>>  Prabu.N
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>> >>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> -----------------
>> >> Red Hat, Inc.
>> >> FuseSource is now part of Red Hat
>> >> Email: cibsen@redhat.com
>> >> Web: http://fusesource.com
>> >> Twitter: davsclaus
>> >> Blog: http://davsclaus.com
>> >> Author of Camel in Action: http://www.manning.com/ibsen
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi

I need one help,I want set JMSExpiration value before routing messages.

i tried setting JMSExpiration in .setHeader

But it didn't work.I still seeing JMSExpiration is zero.

*Thanks*
Prabu.N


On Wed, Apr 24, 2013 at 9:28 PM, Prabu <pr...@gmail.com> wrote:

> Please kindly help me.
>
>
> Regards
> Prabu.N
>
>
> On Wed, Apr 24, 2013 at 2:54 PM, Prabu <pr...@gmail.com> wrote:
>
>> Hi All,
>>
>> I am facing some issue in my camel code.
>>
>> Initially i have used java code to route messages from one end to another
>> end.
>>
>> I modified code to route message using camel routing insight of java code.
>>
>> After modified code,i am facing issue in my code.
>>
>> 500 Messages stored in DLQ.testQueue
>>
>> When i try to re-delivery all 500 messages using active-mq API *moveMessageTo
>> method.*
>>
>> 250 or 200 or 100 messages still i can see in DLQ.testQueue.
>>
>> I feel messages re-delivering,But due to some message coming back again
>> into DLQ.
>>
>> Please kindly help me.
>>
>> *Regards*
>> Prabu.N
>>
>>
>> On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
>> ml-node+s465427n5731018h60@n5.nabble.com> wrote:
>>
>>> Hi
>>>
>>> Looks like java needs a hand[1], after
>>> .to(SCHEDULE_QNAME,ONLINE__QNAME),
>>> you can try endChoice()
>>>
>>> [1]
>>>
>>> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
>>>
>>> Taariq
>>>
>>>
>>> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
>>> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
>>> > wrote:
>>>
>>> > Thanks Claus for your response..
>>> >
>>> > I facing some issue in below code
>>> >
>>> > if condition satisfy i want forward into 2 queues,If not it check
>>> second
>>> > condition forward into next queue.
>>> >
>>> >     from(SURVEYINVITATION_QNAME).choice()
>>> > *          .when(SCHEDULE_PREDICATE)*
>>> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
>>> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
>>> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
>>> >           .otherwise()
>>> >               .to(ERQ_QNAME)
>>> >          .end();
>>> >
>>> >
>>> > I am getting compilation error,Please correct me what mistake i am
>>> making
>>> > here
>>> >
>>> > *Regards*
>>> > Prabu.N
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
>>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
>>> wrote:
>>> >
>>> > > Hi
>>> > >
>>> > > If no destinations is returned, then the message is not routed
>>> anywhere.
>>> > >
>>> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
>>> > > <[hidden email] <
>>> http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
>>> > > wrote:
>>> > >
>>> > > > *One quick question.*
>>> > > >
>>> > > >
>>> > >
>>> >
>>> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>>>
>>> > >
>>> > > >
>>> > > > @RecipientList()
>>> > > >  public Set<String> routeTo(Exchange ex) {
>>> > > >
>>> > > >  final Set<String> destinations = new HashSet<String>();
>>> > > >
>>> > > >  //based on condition we add messages header/content ,We add queue
>>> > names
>>> > > in
>>> > > > destinations varible.
>>> > > >  //destinations.add("activemq:queue:listqueue")
>>> > > >
>>> > > >   return destinations;
>>> > > >  }
>>> > > >
>>> > > > some cases,messages content not satisfy any condition and it
>>> returning
>>> > > > empty destinations set.
>>> > > >
>>> > > > If destinations set is empty where message will go?.
>>> > > >
>>> > > > Because,i can't see messages in HHH.InboundQueue and any queues.
>>> > > >
>>> > > > *Regards*
>>> > > > Prabu.N
>>> > > >
>>> > > >
>>> > > >
>>> > > >
>>> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
>>> > > wrote:
>>> > > >
>>> > > >> So for dynamic queue i have to use only recipientlist correct,we
>>> can't
>>> > > use
>>> > > >> .to
>>> > > >>
>>> > > >> One more question,i can't use otherwise in choice please correct
>>> if my
>>> > > >> syntax is wrong.
>>> > > >>
>>> > > >>
>>> > > >> from(INBOUND_QUEUE)
>>> > > >> .choice().when(header(TYPE).isNotNull())
>>> > > >>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>> > > >> .otherwise()
>>> > > >>    .to(ERQ_QNAME)
>>> > > >> .endChoice();
>>> > > >>
>>> > > >> After execute i am getting following error.
>>> > > >>
>>> > > >> Error:
>>> > > >>
>>> > > >> Router.java:22: cannot find symbol
>>> > > >> symbol  : method otherwise()
>>> > > >> location: class
>>> > > >> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>>> > > >> model.ChoiceDefinition>
>>> > > >>            .otherwise()
>>> > > >>            ^
>>> > > >>
>>> > > >>
>>> > > >>
>>> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
>>> > > >> [hidden email] <
>>> http://user/SendEmail.jtp?type=node&node=5731013&i=3
>>>
>>> > >>
>>> > > wrote:
>>> > > >>
>>> > > >>> Hi
>>> > > >>>
>>> > > >>> Yes recipient list uses an expression for evaluating where to
>>> send
>>> > the
>>> > > >>> message to.
>>> > > >>> See its doc
>>> > > >>> http://camel.apache.org/recipient-list.html
>>> > > >>>
>>> > > >>> And this FAQ
>>> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>>> > > >>>
>>> > > >>> And there is no performance overhead. eg when you send the
>>> message to
>>> > > >>> a previous destination, then that endpoints/producer is reused.
>>> > > >>>
>>> > > >>>
>>> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
>>> > > >>> <[hidden email] <
>>> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>>> > >
>>> > > >>> wrote:
>>> > > >>>
>>> > > >>> > Question:1
>>> > > >>> >
>>> > > >>> > I am having code like blow.based on condition i want forward
>>> into
>>> > > >>> dynamic
>>> > > >>> > queue.
>>> > > >>> >
>>> > > >>> >  .when(header(TYPE).isNotNull())
>>> > > >>> >
>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>> > > >>> >
>>> > > >>> > i want to use .to(simple ) insight of .recipientList(simple)
>>> > > >>> >
>>> > > >>> > Please suggest is it possible?.why it is not possible is there
>>> any
>>> > > >>> > performance issue if i use .recipientList(simple)
>>> > > >>> >
>>> > > >>> > Questuon:2
>>> > > >>> >
>>> > > >>> > Error in code
>>> > > >>> >
>>> > > >>> > from(INBOUND_QUEUE)
>>> > > >>> > .choice().when(header(TYPE).isNotNull())
>>> > > >>> >
>>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>>> > > >>> > .otherwise()
>>> > > >>> >    .to(ERQ_QNAME)
>>> > > >>> > .endChoice();
>>> > > >>> >
>>> > > >>> > After execute i am getting following error.
>>> > > >>> >
>>> > > >>> > Error:
>>> > > >>> >
>>> > > >>> > Router.java:22: cannot find symbol
>>> > > >>> > symbol  : method otherwise()
>>> > > >>> > location: class
>>> > > >>> >
>>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>>> > > >>> > model.ChoiceDefinition>
>>> > > >>> >            .otherwise()
>>> > > >>> >            ^
>>> > > >>> >
>>> > > >>> > Question:3
>>> > > >>> >
>>> > > >>> > I having more than 85 queues.Based on condition i want to
>>> forward
>>> > to
>>> > > >>> correct
>>> > > >>> > queue.
>>> > > >>> >
>>> > > >>> > In my route builder i having code below for all 85 queus.
>>> > > >>> >
>>> > > >>> >   from(ALERT_QNAME).choice()
>>> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>>> > > >>> >           .otherwise()
>>> > > >>> >           .to(ERQ_QNAME)
>>> > > >>> >  .end();
>>> > > >>> >
>>> > > >>> > I feel like because of my code performance getting
>>> degrade.Please
>>> > > >>> suggest if
>>> > > >>> > i am wrong?
>>> > > >>> >
>>> > > >>> > When i open jconsole i am getting white screen and queues some
>>> time
>>> > > not
>>> > > >>> > showing any attribute?
>>> > > >>> >
>>> > > >>> > Please kindly help me.
>>> > > >>> >
>>> > > >>> >
>>> > > >>> >
>>> > > >>> > --
>>> > > >>> > View this message in context:
>>> > > >>>
>>> > >
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>>> > > >>>
>>> > > >>> > Sent from the Camel - Users mailing list archive at
>>> Nabble.com.
>>> > > >>>
>>> > > >>>
>>> > > >>>
>>> > > >>> --
>>> > > >>> Claus Ibsen
>>> > > >>> -----------------
>>> > > >>> Red Hat, Inc.
>>> > > >>> FuseSource is now part of Red Hat
>>> > > >>> Email: [hidden email]<
>>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
>>> > > >>> Web: http://fusesource.com
>>> > > >>> Twitter: davsclaus
>>> > > >>> Blog: http://davsclaus.com
>>> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
>>> > > >>>
>>> > > >>>
>>> > > >>> ------------------------------
>>> > > >>>  If you reply to this email, your message will be added to the
>>> > > >>> discussion below:
>>> > > >>>
>>> > > >>>
>>> > >
>>> > > >>> .
>>> > > >>> 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
>>> > >
>>> > >
>>> > > >>>
>>> > > >>
>>> > > >>
>>> > > >>
>>> > > >> --
>>> > > >> Thanks & Regards
>>> > > >>  Prabu.N
>>> > > >>
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > Thanks & Regards
>>> > > >  Prabu.N
>>> > > >
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > View this message in context:
>>> > >
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
>>> > >
>>> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > Claus Ibsen
>>> > > -----------------
>>> > > Red Hat, Inc.
>>> > > FuseSource is now part of Red Hat
>>> > > Email: [hidden email]<
>>> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
>>> > > Web: http://fusesource.com
>>> > > Twitter: davsclaus
>>> > > Blog: http://davsclaus.com
>>> > > Author of Camel in Action: http://www.manning.com/ibsen
>>> > >
>>> > >
>>> > > ------------------------------
>>> > >  If you reply to this email, your message will be added to the
>>> discussion
>>> > > below:
>>> > >
>>> > >
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
>>> > >  To unsubscribe from Camel routing issue, 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
>>> > >
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > Thanks & Regards
>>> >  Prabu.N
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > View this message in context:
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
>>>
>>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>> >
>>>
>>>
>>> ------------------------------
>>>  If you reply to this email, your message will be added to the
>>> discussion below:
>>>
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731018.html
>>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>>> .
>>> 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>
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>>  Prabu.N
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736112.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi Chris/Claus,

*Question:1*

I am having code like blow.based on condition i want forward into dynamic
queue.

 .when(header(TYPE).isNotNull())
  .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))

i want to use .to(simple ) insight of .recipientList(simple)

Please suggest is it possible?.why it is not possible is there any
performance issue if i use .recipientList(simple)

*Question:2*

 I having more than 85 queues.Based on condition i want to forward to
correct queue.

In my route builder i having code below for all 85 queus.

  from(ALERT_QNAME).choice()
          .when(ALERT_PREDICATE).to(ALERT_QNAME)
          .otherwise()
          .to(ERQ_QNAME)
 .end();

I feel like because of my code performance getting degrade.Please suggest
if i am wrong?

When i open jconsole i am getting white screen and queues some time not
showing any attribute?


Please kindly help me.

*Regards*
Prabu.N


On Wed, Apr 10, 2013 at 7:39 PM, Chris Wolf [via Camel] <
ml-node+s465427n5730662h24@n5.nabble.com> wrote:

> You're asking about a problem with "CARD_EVENT_PREDICATE" without
> including
> the definition of that?
>
>
> On Tue, Apr 9, 2013 at 8:31 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730662&i=1>>wrote:
>
>
> > Hi Chris,
> >
> > from(CARD_TYPE_SPECIFIC_QNAME).choice()
> > .when(SCHEDULE_PREDICATE).multicast().to(CARD_QNAME,SCHEDULE_QNAME);
> > .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
> > .otherwise()
> > .setHeader(PROPERTY_ORIGINAL_DESTINATION,
> > constant(PROPERTY_ORIGINAL_DESTINATION_VALUE))
> > .to(ERQ_QNAME)
> > .end();
> >
> > When i compile above code i am getting followin
> >
> > lder.java:115: illegal start of expression
> >     .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
> >               ^
> >
> > Please kindly help me,i am doing any syntax mistake here
> >
> > *Regards*
> > Prabu.N
> >
> >
> >
> >
> >
> > On Fri, Apr 5, 2013 at 3:58 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=2>>
> wrote:
> >
> > > Thanks Chris/Claus it worked,
> > >
> > >
> > > Hi Chris/Claus,
> > >
> > > When running active-mq 5.8 i am getting following issue,do you have
> any
> > > idea.
> > >
> > > 2013-04-05 05:26:16,312 | WARN  | Async error occurred:
> > > java.lang.IllegalStateException: Cannot add a consumer to a connection
> > that
> > > had not been registered:
> > >
> > >
> > > *Regards*
> > > Prabu.N
> > >
> > >
> > >
> > >
> > > On Thu, Apr 4, 2013 at 6:55 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=3>>
> wrote:
> > >
> > >> 1.) You're NOT using my code - it's still the same as you had before
> > >> 2.) You're still calling setHeader(java.lang.String,
> java.lang.String)
> > >>      even though I tried to tell you that it has to be
> > >>      setHeader(java.lang.String, org.apache.camel.Expression)
> > >>
> > >> On Wed, Apr 3, 2013 at 2:51 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=4>>
> wrote:
> > >> > Please kindly help me...
> > >> >
> > >> > On Apr 3, 2013 8:54 PM, "Prabu" <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=5>>
> wrote:
> > >> >>
> > >> >> Hi Chris,
> > >> >>
> > >> >> I used your code.But i am getting following compilation error
> > >> >>
> > >> >> lder.java:92: cannot find symbol
> > >> >> symbol  : method setHeader(java.lang.String,java.lang.String)
> > >> >> location: class org.apache.camel.model.ChoiceDefinition
> > >> >>                   .otherwise().setHeader("MyHeader","sdfsdf")
> > >> >>
> > >> >>
> > >> >> Note: I am using camel 2.10 version
> > >> >>
> > >> >>
> > >> >>
> > >> >> On Wed, Apr 3, 2013 at 8:22 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=6>>
>
> > >> wrote:
> > >> >>>
> > >> >>> Hi Prabu,
> > >> >>>
> > >> >>> I don't mind helping, but could you continue to use the
> > >> >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=7>rather then my private email?  That way, if
> > >> >>> other people have similar issues, they can benefit.
> > >> >>>
> > >> >>>
> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> > >> >>>            .otherwise()
> > >> >>>            .setHeader("MyHeader", constant("some-value"))  //
> <===
> > Set
> > >> >>> Header
> > >> >>>            .to(ERQ_QNAME)
> > >> >>>    .end();
> > >> >>>
> > >> >>> This technique will use the "simple" language function "constant"
> to
> > >> >>> set a string constant value.
> > >> >>> If the value you need to set is dynamic, then you could use a
> > >> >>> property placeholder.
> > >> >>>
> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> > >> >>>            .otherwise()
> > >> >>>            .setHeader("MyHeader", constant("{{some-prop}}"))  //
> > <===
> > >> Set
> > >> >>> Header
> > >> >>>            .to(ERQ_QNAME)
> > >> >>>    .end();
> > >> >>>
> > >> >>> There are even more sophisticated ways to acquire dynamic values:
> > >> >>>
> > >> >>> http://camel.apache.org/python.html
> > >> >>>
> > >> >>> Regards,
> > >> >>>
> > >> >>> Chris
> > >> >>>
> > >> >>> On Wed, Apr 3, 2013 at 9:52 AM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=8>>
> wrote:
> > >> >>> > I have code like this,
> > >> >>> >
> > >> >>> >     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice()
> > >> >>> >           .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> > >> >>> >           .otherwise().to(ERQ_QNAME)
> > >> >>> >    .end();
> > >> >>> >
> > >> >>> >     from(DEACTIVATIN_TYPE_SPECIFIC_QNAME).choice()
> > >> >>> >
> > >> >>> > .when(ALERT_FAILURE_HANDLER_PREDICATE).to(ALERT_FAILURE_QNAME)
> > >> >>> >           .otherwise().to(ERQ_QNAME)
> > >> >>> >     .end();
> > >> >>> >
> > >> >>> > I want to set some values to header inside otherwise that is
> > before
> > >> >>> > message
> > >> >>> > move to ERQ_QNAME.
> > >> >>> >
> > >> >>> > please kindly help me how to do that.
> > >> >>> >
> > >> >>> > Regards
> > >> >>> > Prabu.N
> > >> >>> >
> > >> >>> >
> > >> >>> > On Tue, Apr 2, 2013 at 10:52 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=9>>
>
> > >> wrote:
> > >> >>> >>
> > >> >>> >> No,i didn't received ...
> > >> >>> >>
> > >> >>> >> Regards
> > >> >>> >> Prabu.N
> > >> >>> >>
> > >> >>> >>
> > >> >>> >> On Tue, Apr 2, 2013 at 7:31 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=10>
> > >
> > >> >>> >> wrote:
> > >> >>> >>>
> > >> >>> >>> Hi Prabu,
> > >> >>> >>>
> > >> >>> >>> Just out of curiosity - I am wondering if saw my email I sent
> > >> >>> >>> yesterday in response to your question?
> > >> >>> >>> I sent it to "[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=11>"
> with the subject,
> > >> >>> >>> "Content-based routing with Expressions and Predicates"...
> > >> >>> >>>
> > >> >>> >>> Regards,
> > >> >>> >>>
> > >> >>> >>> Chris
> > >> >>> >>>
> > >> >>> >>> On Tue, Apr 2, 2013 at 4:17 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=12>
> > >> >>> >>> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=13>>
> wrote:
> > >> >>> >>> > I have found solution in internet using Predicate  we can
> > >> achieve
> > >> >>> >>> > this,
> > >> >>> >>> >
> > >> >>> >>> > But,one doubt in the link
> > >> >>> >>> > http://camel.apache.org/predicate.html,Theymentioned that
> we
> > >> can
> > >> >>> >>> > use
> > >> >>> >>> > AND and OR in Predicate
> > >> >>> >>> >
> > >> >>> >>> > I have added below code in project,But i am getting
> > compilation
> > >> >>> >>> > error.Please kindly help
> > >> >>> >>> >
> > >> >>> >>> > *Predicate god = and(admin, or(body().contains("Camel
> Rider"),
> > >> >>> >>> > header("type").isEqualTo("god")));*
> > >> >>> >>> >
> > >> >>> >>> > *Thanks*
> > >> >>> >>> > Prabu.N
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=14>>
>
> > >> wrote:
> > >> >>> >>> >
> > >> >>> >>> >> Hi *Chris / **Claus*,
> > >> >>> >>> >>
> > >> >>> >>> >> I have one *Inbound* queue,based on header and content
> type,I
> > >> want
> > >> >>> >>> >> forward to outbound queue.
> > >> >>> >>> >> *
> > >> >>> >>> >> Example 1:
> > >> >>> >>> >> *
> > >> >>> >>> >> *
> > >> >>> >>> >> Inbound.queue name : **Inbound.Test.DDD
> > >> >>> >>> >> Outbound.queue name : SOURHQueueName
> > >> >>> >>> >>
> > >> >>> >>> >> *
> > >> >>> >>> >> *Criteria or Condition :
> > >> >>> >>> >> *
> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
> > >> >>> >>> >>    *AND*
> > >> >>> >>> >> Message *Type* value is : *card.test *or*
> card.expiry.test*
> > >> >>> >>> >>
> > >> >>> >>> >> *Example 2:*
> > >> >>> >>> >>
> > >> >>> >>> >> *Inbound.queue name : **Inbound.Test.SSS
> > >> >>> >>> >> Outbound.queue name : WESTQueueName
> > >> >>> >>> >> *
> > >> >>> >>> >> *Criteria or Condition :*
> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
> > >> >>> >>> >>  *AND
> > >> >>> >>> >> *
> > >> >>> >>> >> Message *Type *value *start with* :*card.event*
> > >> >>> >>> >>
> > >> >>> >>> >> I want achieve this using camel routing java DSL.
> > >> >>> >>> >>
> > >> >>> >>> >> Please help me.How can i use AND,OR and regular expression
> in
> > >> >>> >>> >> camel
> > >> >>> >>> >> routing
> > >> >>> >>> >>
> > >> >>> >>> >> *Regards*
> > >> >>> >>> >> Prabu.N
> > >> >>> >>> >>
> > >> >>> >>> >>
> > >> >>> >>> >> On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
> > >> >>> >>> >> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=15>>
> wrote:
> > >> >>> >>> >>
> > >> >>> >>> >>> Hi Claus,
> > >> >>> >>> >>>
> > >> >>> >>> >>> Thanks for the response - I could not see any obvious way
> to
> > >> >>> >>> >>> configure
> > >> >>> >>> >>> an FTP Consumer at ***runtime***,
> > >> >>> >>> >>> either via bean, processor or consumer template.  If you
> > have
> > >> a
> > >> >>> >>> >>> concrete example, that would be great to see...
> > >> >>> >>> >>>
> > >> >>> >>> >>> ...otherwise, here's the solution I came up with:
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>     -Chris
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>   // simulate incoming message from JMS...
> > >> >>> >>> >>>   from("timer:kickoff?repeatCount=1")
> > >> >>> >>> >>>   .to("direct:start");
> > >> >>> >>> >>>
> > >> >>> >>> >>>   // upon receipt of FTP config from JMS, invoke
> > >>  FtpConfigurer
> > >> >>> >>> >>> bean
> > >> >>> >>> >>> to reconfigure
> > >> >>> >>> >>>   // FTP route, then start it...
> > >> >>> >>> >>>   from("direct:start")
> > >> >>> >>> >>>   .beanRef("configRdr") // config reader bean not shown
> here
> > >> >>> >>> >>>   .convertBodyTo(Document.class)
> > >> >>> >>> >>>   // sets a bunch of headers from DOM, e.g.:
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>
> > >> >>> >>> >>>
> > >> >>> >>> >>> String.class)
> > >> >>> >>> >>>   .setHeader("ftp-route-id", constant("ftp.route"))
> > >> >>> >>> >>>   .beanRef("ftpConfigurer");
> > >> >>> >>> >>>
> > >> >>> >>> >>>   // FTP route will only be started by FtpConfigurer bean
> > >> after
> > >> >>> >>> >>> it's
> > >> >>> >>> >>> dynamically re-configured...
> > >> >>> >>> >>>   from("ftp://bogushost/bogusdir?startScheduler=false")
> //
> > >> the
> > >> >>> >>> >>> URI
> > >> >>> >>> >>> will be reconfigured...
> > >> >>> >>> >>>   .routeId("ftp.route").noAutoStartup()
> > >> >>> >>> >>>   .log("Received file ${file:onlyname}")
> > >> >>> >>> >>>   .to("file:/tmp/local/data");
> > >> >>> >>> >>>
> > >> >>> >>> >>>   public class FtpConfigurer {
> > >> >>> >>> >>>     public void configureFtpConsumer(Exchange exchange)
> > throws
> > >> >>> >>> >>> Exception
> > >> >>> >>> >>> {
> > >> >>> >>> >>>         CamelContext context = exchange.getContext();
> > >> >>> >>> >>>         Map<String, Object> headers =
> > >> >>> >>> >>> exchange.getIn().getHeaders();
> > >> >>> >>> >>>         Map<String, Object> parameters = new
> HashMap<String,
> > >> >>> >>> >>> Object>();
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // Filter headers for ftp-config specific
> headers...
> > >> >>> >>> >>>         for (Map.Entry<String, Object> entry :
> > >> >>> >>> >>> headers.entrySet()) {
> > >> >>> >>> >>>             String key = entry.getKey();
> > >> >>> >>> >>>             if (key.startsWith("ftp-config."))
> > >> >>> >>> >>>
> > >> >>> >>> >>> parameters.put(key.substring("ftp-config.".length()),
> > >> >>> >>> >>> entry.getValue());
> > >> >>> >>> >>>         }
> > >> >>> >>> >>>
> > >> >>> >>> >>>         String routeId =
> > >> >>> >>> >>> exchange.getIn().getHeader("ftp-route-id",
> > >> >>> >>> >>> String.class);
> > >> >>> >>> >>>         Route ftpRoute = context.getRoute(routeId);
> > >> >>> >>> >>>         FtpConsumer c = (FtpConsumer)
> > ftpRoute.getConsumer();
> > >> >>> >>> >>>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
> > >> >>> >>> >>> c.getEndpoint();
> > >> >>> >>> >>>         FtpConfiguration rfc = rfe.getConfiguration();
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // Need to crack open FtpConsumer's
> "endpointPath"
> > >> field
> > >> >>> >>> >>> since
> > >> >>> >>> >>>         // there's no mutator (setter)
> > >> >>> >>> >>>         Class<?> cls = c.getClass();
> > >> >>> >>> >>>         Field endpointPath_fld =
> > >> >>> >>> >>> cls.getDeclaredField("endpointPath");
> > >> >>> >>> >>>         endpointPath_fld.setAccessible(true);
> > >> >>> >>> >>>         endpointPath_fld.set(c,
> > >> >>> >>> >>> (String)parameters.get("directory"));
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // Need to crack open FtpEndpoint, actually
> > >> >>> >>> >>> DefaultEndpoint -
> > >> >>> >>> >>> the ultimate base class
> > >> >>> >>> >>>         // since there's no mutator (setter) for the
> > >> >>> >>> >>> "endpointUri"
> > >> >>> >>> >>> field
> > >> >>> >>> >>>         cls = rfe.getClass();
> > >> >>> >>> >>>         Field endpointUri_fld = null;
> > >> >>> >>> >>>         while (endpointUri_fld == null) {
> > >> >>> >>> >>>             // TODO: maybe change logic to just stop at
> > >> >>> >>> >>> class=DefaultEndpoint
> > >> >>> >>> >>>             // rather then using NoSuchFieldException
> > >> >>> >>> >>>             try {
> > >> >>> >>> >>>                 endpointUri_fld =
> > >> >>> >>> >>> cls.getDeclaredField("endpointUri");
> > >> >>> >>> >>>             } catch (NoSuchFieldException nsfe) {
> > >> >>> >>> >>>                 cls = cls.getSuperclass();
> > >> >>> >>> >>>             }
> > >> >>> >>> >>>         }
> > >> >>> >>> >>>         endpointUri_fld.setAccessible(true);
> > >> >>> >>> >>>         endpointUri_fld.set(rfe,
> > >> >>> >>> >>>             String.format("ftp://%s/%s",
> > >> >>> >>> >>> (String)parameters.get("host"),
> > >> >>> >>> >>> (String)parameters.get("directory")));
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // set reference properties first as they use #
> > syntax
> > >> >>> >>> >>> that
> > >> >>> >>> >>> fools the regular properties setter
> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
> rfc,
> > >> >>> >>> >>> parameters);
> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfc,
> > >> parameters);
> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
> rfe,
> > >> >>> >>> >>> parameters);
> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfe,
> > >> parameters);
> > >> >>> >>> >>>         c.setStartScheduler(true);
> > >> >>> >>> >>>
> > >> >>> >>> >>>         context.startRoute(routeId);
> > >> >>> >>> >>>   }
> > >> >>> >>> >>> }
> > >> >>> >>> >>>
> > >> >>> >>> >>> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden
> > >> >>> >>> >>> email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=0
> > >>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>>
> > >> >>> >>> >>> > Hi
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > See this EIP
> > >> >>> >>> >>> > http://camel.apache.org/content-enricher.html
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > About pollEnrich.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > Though pollEnrich currently does support dynamic uris.
> Its
> > >> on
> > >> >>> >>> >>> > the
> > >> >>> >>> >>> roadmap,
> > >> >>> >>> >>> > for Camel 3.0.
> > >> >>> >>> >>> > It requires an API change and thus isn't so easy to
> > >> implement
> > >> >>> >>> >>> > currently
> > >> >>> >>> >>> on
> > >> >>> >>> >>> > 2.x.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > You can always use a java bean / camel processor, and
> > >> consume
> > >> >>> >>> >>> > the
> > >> >>> >>> >>> > ftp
> > >> >>> >>> >>> file
> > >> >>> >>> >>> > from java code.
> > >> >>> >>> >>> > For example using consumer template.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > As you use FTP you may want to set disconnect=true so
> the
> > >> >>> >>> >>> > connect
> > >> >>> >>> >>> > is
> > >> >>> >>> >>> not
> > >> >>> >>> >>> > remained open after usage.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden
> > >> >>> >>> >>> > email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=1
> > >> >>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >> Ok, I'm starting to get it - a little bit.  As for my
> > >> concrete
> > >> >>> >>> >>> >> example, so far, I have:
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>                 from("direct:start")
> > >> >>> >>> >>> >>                 .beanRef("config")
> > >> >>> >>> >>> >>                 .convertBodyTo(Document.class)
> > >> >>> >>> >>> >>                 .recipientList().xquery(
> > >> >>> >>> >>> >>                     "concat('ftp://'" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/server/@value" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> +
> > >> >>> >>> >>> >>                     ",'?noop=true&amp;username='" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> > >> >>> >>> >>> >>                     ",'&amp;password='" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> ",//remote[vendorId/@value='CBOE34']/password/@value)",
> > >> >>> >>> >>> >> String.class);
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> Here's the problem - this will create an FTP Producer
> -
> > >> that's
> > >> >>> >>> >>> >> not
> > >> >>> >>> >>> >> what I need.  I need a dynamically
> > >> >>> >>> >>> >> constructed URI for a polling FTP consumer.  I don't
> > think
> > >> >>> >>> >>> >> "recipientList" will work...   Any ideas?
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> Thanks,
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> Chris
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden
> > >> >>> >>> >>> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>> >> > Hi Claus,
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > I hate to ask this - but I still don't get it.  I
> > thought
> > >> >>> >>> >>> >> > "recipientList" was for sending to multiple,
> > >> runtime-defined
> > >> >>> >>> >>> >> > recipients.  I don't see how this
> > >> >>> >>> >>> >> > answers the question of sending to one, single
> > recipient,
> > >> >>> >>> >>> >> > whose
> > >> >>> >>> >>> >> > URI
> > >> >>> >>> >>> is
> > >> >>> >>> >>> >> > dynamically constructed - and in my use-case the
> > dynamic
> > >> >>> >>> >>> >> > settings
> > >> >>> >>> >>> >> > are not in properties - so "simple" (property
> > >> place-holders)
> > >> >>> >>> >>> >> > won't
> > >> >>> >>> >>> help
> > >> >>> >>> >>> >> me.
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > Let me give you a concrete example.  I need to do an
> > ftp
> > >> >>> >>> >>> >> > download
> > >> >>> >>> >>> and
> > >> >>> >>> >>> >> > the connection information comes from up-stream in
> the
> > >> route
> > >> >>> >>> >>> >> > in
> > >> >>> >>> >>> >> > the
> > >> >>> >>> >>> >> > form of XML (DOM - a Document instance).  Currently,
> I
> > am
> > >> >>> >>> >>> >> > trying
> > >> >>> >>> >>> >> > to
> > >> >>> >>> >>> do
> > >> >>> >>> >>> >> > this with bean binding and method params decorated
> with
> > >> >>> >>> >>> >> > @XPath
> > >> >>> >>> >>> >> > pointing into the Document with the ftp settings and
> > >> inside
> > >> >>> >>> >>> >> > the
> > >> >>> >>> >>> >> > this method doing:
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > FtpComponent ftpComponent =
> context.getComponent("ftp",
> > >> >>> >>> >>> >> FtpComponent.class);
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > ..and then attempt to get the endpoint and call
> > >> >>> >>> >>> >> > createConsumer(...).
> > >> >>> >>> >>> >> > I'm sure this is not the right way to do it, but I
> > don't
> > >> see
> > >> >>> >>> >>> >> > how
> > >> >>> >>> >>> else
> > >> >>> >>> >>> >> > - any ideas?
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > Thanks,
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > Chris
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen
> <[hidden
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> wrote:
> > >> >>> >>> >>> >> >> Hi
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> See this FAQ
> > >> >>> >>> >>> >> >>
> > >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=4>
> > >> >>> >>> >>> >> >> <[hidden
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>> Thanks Walzer..
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>> *Queston1:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>> *Example*
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> .when(header("foo").isEqualTo("bar"))
> > >> >>> >>> >>> >> >>>                     .to("direct:b")
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> In my case i have to add more than 80 condition
> and
> > >> >>> >>> >>> >> >>> forwards
> > >> >>> >>> >>> >> >>> to 80
> > >> >>> >>> >>> >> >>> different queues.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Above example i can only hard-code queue name,But
> > what
> > >> i
> > >> >>> >>> >>> >> >>> want
> > >> >>> >>> >>> >> >>> is
> > >> >>> >>> >>> below.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> * .when(header("Type").isNotNull())
> > >> >>> >>> >>> >> >>>     .to("activemq.Inbound."+header("Type"))
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Example:If queue type is test,It should forward to
> > >> >>> >>> >>> >> >>> *Inbound.test*
> > >> >>> >>> >>> >> queue.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Above example i tried,but it did not
> worked,created
> > >> queue
> > >> >>> >>> >>> something
> > >> >>> >>> >>> >> >>> like this *Inbound.header("type")*
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> *Question2*:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> from("direct:a")
> > >> >>> >>> >>> >> >>>             .multicast().to("direct:b",
> "direct:c",
> > >> >>> >>> >>> >> >>> "direct:d");
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Based on messages header and content type i want
> > >> forward
> > >> >>> >>> >>> >> >>> to
> > >> >>> >>> >>> different
> > >> >>> >>> >>> >> >>> queue.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> condition will be *OR *and *AND*.How can i do that
> > like
> > >> >>> >>> >>> >> >>> above
> > >> >>> >>> >>> example.*
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Thanks in advance*
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> *Regards*
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Prabu.N
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas
> [via
> > >> >>> >>> >>> >> >>> Camel] <
> > >> >>> >>> >>> >> >>> [hidden
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> > Hi,
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > you could start by reading Claus´ book (p. 44ff)
> > >> which
> > >> >>> >>> >>> >> >>> > has a
> > >> >>> >>> >>> perfect
> > >> >>> >>> >>> >> >>> > example or
> > >> >>> >>> >>> >> >>> >
> http://camel.apache.org/content-based-router.html
> > >> >>> >>> >>> >> >>> > (just
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> >>> > replace the direct: with your queues).
> > >> >>> >>> >>> >> >>> > If you need to fire your messages to multiple
> > queues:
> > >> >>> >>> >>> >> >>> >
> > >> http://camel.apache.org/publish-subscribe-channel.html
> > >> >>> >>> >>> >> >>> > shows
> > >> >>> >>> >>> you the
> > >> >>> >>> >>> >> >>> > various ways.
> > >> >>> >>> >>> >> >>> > When you get the concepts you can just "lego"
> them
> > >> >>> >>> >>> >> >>> > together.
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > Regards, Thomas.
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> > >> >>> >>> >>> >> >>>
> http://user/SendEmail.jtp?type=node&node=5730116&i=0
> > >"
> > >> >>> >>> >>> >> >>> > <[hidden email] <
> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > > Hi Claus,
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > Thanks so much Clus for help.It is working
> now.
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > I need your guidance for the following
> > requirement.
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > 1.I have one *inbound queue* it will receive
> > >> message
> > >> >>> >>> >>> frequently
> > >> >>> >>> >>> >> from my
> > >> >>> >>> >>> >> >>> > > application.
> > >> >>> >>> >>> >> >>> > > 2.From *inbound queue* i need camel routing to
> > move
> > >> >>> >>> >>> >> >>> > > message
> > >> >>> >>> >>> from
> > >> >>> >>> >>> >> >>> > > another *message
> > >> >>> >>> >>> >> >>> > > based inbound queue* based on message header
> > value.
> > >> >>> >>> >>> >> >>> > > 3.From *message based inbound queue *i* *need
> > camel
> > >> >>> >>> >>> >> >>> > > routing to
> > >> >>> >>> >>> move
> > >> >>> >>> >>> >> >>> > message
> > >> >>> >>> >>> >> >>> > > to *one or more outbound queue *based on
> message
> > >> >>> >>> >>> >> >>> > > content*
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > I need *camel java DSL*sample code for above
> > >> >>> >>> >>> >> >>> > > requirement.*
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > > *Thanks in advance*
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2
> > [via
> > >> >>> >>> >>> >> >>> > > Camel]
> > >> >>> >>> >>> >> >>> > > <
> > >> >>> >>> >>> >> >>> > > [hidden email] <
> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>
> > >> >>> >>> >>> >> >>> > wrote:
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >> Hi
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> Do as the exception tells you. Check route 2.
> > You
> > >> >>> >>> >>> >> >>> > >> route
> > >> >>> >>> >>> >> >>> > >> from
> > >> >>> >>> >>> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know
> to
> > >> >>> >>> >>> >> >>> > >> Camel.
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> Maybe you need to add "activemq:" as prefix
> so
> > its
> > >> >>> >>> >>> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden
> email]<
> > >> >>> >>> >>> >> >>> >
> > http://user/SendEmail.jtp?type=node&node=5730109&i=0
> > >> >
> > >> >>> >>> >>> >> >>> > >> <[hidden email] <
> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> > >> >>> >>> >>> >> >>> >>
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > >> wrote:
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I have activemmq  Project in that i have
> > >> following
> > >> >>> >>> >>> requirement
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> 1.Move message from Inbound queue to type
> based
> > >> >>> >>> >>> >> >>> > >>> inbound
> > >> >>> >>> >>> queue.
> > >> >>> >>> >>> >> >>> > >>> 2.Move message from Message type inbound
> queue
> > to
> > >> >>> >>> >>> >> >>> > >>> outbound
> > >> >>> >>> >>> queue
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I have created two bean for to achieve this.
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> 1.one for move from inbound to message type
> > >>  inbound
> > >> >>> >>> >>> >> >>> > >>> queue
> > >> >>> >>> >>> >> >>> > >>> 2.one for move from inbound to outbound
> queue.
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I have following entry in camel.xml
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>   <camelContext id="camel" xmlns="
> > >> >>> >>> >>> >> >>> > http://camel.apache.org/schema/spring">
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>                <routeBuilder
> ref="routeBuilder"
> > >> />
> > >> >>> >>> >>> >> >>> > >>>            <routeBuilder ref="routeBuilder1"
> />
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>    </camelContext>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder"
> > >> >>> >>> >>> >> >>> > >>>
> > class="com.camel.routes.SinglecastRouteBuilder"/>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator"
> > >> >>> >>> >>> >> >>> > >>>
> class="com.camel.routes.TypeSpecificListBean"/>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder1"
> > >> >>> >>> >>> >> >>> > >>>
> > class="com.camel.routes.MulticastRouteBuilder"/>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator1"
> > >> >>> >>> >>> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> When i run application i am getting
> following
> > >> error.
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> * java.lang.Exception:
> > >> >>> >>> >>> org.apache.camel.RuntimeCamelException:
> > >> >>> >>> >>> >> >>> > >>> org.apache.camel.Fa
> > >> >>> >>> >>> >> >>> > >>> iledToCreateRouteException: Failed to create
> > >> route
> > >> >>> >>> >>> >> >>> > >>> route2:
> > >> >>> >>> >>> >> >>> > >>> Route[[From[Inbound.G
> > >> >>> >>> >>> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:...
> > >> because
> > >> >>> >>> >>> >> >>> > >>> of No
> > >> >>> >>> >>> endpoint
> > >> >>> >>> >>> >> >>> > could
> > >> >>> >>> >>> >> >>> > >> be
> > >> >>> >>> >>> >> >>> > >>> found
> > >> >>> >>> >>> >> >>> > >>> for: Inbound.SSS.TestEvent, please check
> your
> > >> >>> >>> >>> >> >>> > >>> classpath
> > >> >>> >>> >>> contains
> > >> >>> >>> >>> >> the
> > >> >>> >>> >>> >> >>> > >> needed
> > >> >>> >>> >>> >> >>> > >>> Cam
> > >> >>> >>> >>> >> >>> > >>> el component jar.*
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I am not sure i am missing any
> > >> configuration,Please
> > >> >>> >>> >>> >> >>> > >>> kindly
> > >> >>> >>> >>> help
> > >> >>> >>> >>> >> me
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> --
> > >> >>> >>> >>> >> >>> > >>> View this message in context:
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> > >> >>> >>> >>> >> >>> > >>> Sent from the Camel - Users mailing list
> > archive
> > >> at
> > >> >>> >>> >>> Nabble.com.
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> --
> > >> >>> >>> >>> >> >>> > >> Claus Ibsen
> > >> >>> >>> >>> >> >>> > >> -----------------
> > >> >>> >>> >>> >> >>> > >> Red Hat, Inc.
> > >> >>> >>> >>> >> >>> > >> FuseSource is now part of Red Hat
> > >> >>> >>> >>> >> >>> > >> Email: [hidden email]<
> > >> >>> >>> >>> >> >>> >
> > http://user/SendEmail.jtp?type=node&node=5730109&i=2
> > >> >
> > >> >>> >>> >>> >> >>> > >> Web: http://fusesource.com
> > >> >>> >>> >>> >> >>> > >> Twitter: davsclaus
> > >> >>> >>> >>> >> >>> > >> Blog: http://davsclaus.com
> > >> >>> >>> >>> >> >>> > >> Author of Camel in Action:
> > >> >>> >>> >>> >> >>> > >> http://www.manning.com/ibsen
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> ------------------------------
> > >> >>> >>> >>> >> >>> > >> If you reply to this email, your message will
> be
> > >> >>> >>> >>> >> >>> > >> added to
> > >> >>> >>> >>> >> >>> > >> the
> > >> >>> >>> >>> >> >>> > discussion
> > >> >>> >>> >>> >> >>> > >> below:
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > >> .
> > >> >>> >>> >>> >> >>> > >> 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
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > --
> > >> >>> >>> >>> >> >>> > > Thanks & Regards
> > >> >>> >>> >>> >> >>> > > Prabu.N
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > --
> > >> >>> >>> >>> >> >>> > > View this message in context:
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > > Sent from the Camel - Users mailing list
> archive
> > at
> > >> >>> >>> >>> Nabble.com.
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > ------------------------------
> > >> >>> >>> >>> >> >>> >  If you reply to this email, your message will
> be
> > >> added
> > >> >>> >>> >>> >> >>> > to
> > >> >>> >>> >>> >> >>> > the
> > >> >>> >>> >>> >> discussion
> > >> >>> >>> >>> >> >>> > below:
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> > >> >>> >>> >>> >> >>> >  To unsubscribe from Camel routing issue, 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
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> --
> > >> >>> >>> >>> >> >>> Thanks & Regards
> > >> >>> >>> >>> >> >>>  Prabu.N
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> --
> > >> >>> >>> >>> >> >>> View this message in context:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> > >> >>> >>> >>> >> >>> Sent from the Camel - Users mailing list archive
> at
> > >> >>> >>> >>> >> >>> Nabble.com.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> --
> > >> >>> >>> >>> >> >> Claus Ibsen
> > >> >>> >>> >>> >> >> -----------------
> > >> >>> >>> >>> >> >> Red Hat, Inc.
> > >> >>> >>> >>> >> >> FuseSource is now part of Red Hat
> > >> >>> >>> >>> >> >> Email: [hidden
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=7>
> > >> >>> >>> >>> >> >> Web: http://fusesource.com
> > >> >>> >>> >>> >> >> Twitter: davsclaus
> > >> >>> >>> >>> >> >> Blog: http://davsclaus.com
> > >> >>> >>> >>> >> >> Author of Camel in Action:
> > http://www.manning.com/ibsen
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > --
> > >> >>> >>> >>> > Claus Ibsen
> > >> >>> >>> >>> > -----------------
> > >> >>> >>> >>> > Red Hat, Inc.
> > >> >>> >>> >>> > FuseSource is now part of Red Hat
> > >> >>> >>> >>> > Email: [hidden
> > >> >>> >>> >>> > email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=8
> > >> >
> > >> >>> >>> >>> > Web: http://fusesource.com
> > >> >>> >>> >>> > Twitter: davsclaus
> > >> >>> >>> >>> > Blog: http://davsclaus.com
> > >> >>> >>> >>> > Author of Camel in Action: http://www.manning.com/ibsen
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>> ------------------------------
> > >> >>> >>> >>>  If you reply to this email, your message will be added
> to
> > the
> > >> >>> >>> >>> discussion below:
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
> > >> >>> >>> >>>  To unsubscribe from Camel routing issue, 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
> > >> >
> > >> >>> >>> >>>
> > >> >>> >>> >>
> > >> >>> >>> >>
> > >> >>> >>> >>
> > >> >>> >>> >> --
> > >> >>> >>> >> Thanks & Regards
> > >> >>> >>> >>  Prabu.N
> > >> >>> >>> >>
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> > --
> > >> >>> >>> > Thanks & Regards
> > >> >>> >>> >  Prabu.N
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> > --
> > >> >>> >>> > View this message in context:
> > >> >>> >>> >
> > >> >>> >>> >
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
> > >> >>> >>> > Sent from the Camel - Users mailing list archive at
> > Nabble.com.
> > >> >>> >>
> > >> >>> >>
> > >> >>> >>
> > >> >>> >>
> > >> >>> >> --
> > >> >>> >> Thanks & Regards
> > >> >>> >>  Prabu.N
> > >> >>> >
> > >> >>> >
> > >> >>> >
> > >> >>> >
> > >> >>> > --
> > >> >>> > Thanks & Regards
> > >> >>> >  Prabu.N
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> Thanks & Regards
> > >> >>  Prabu.N
> > >>
> > >
> > >
> > >
> > > --
> > > Thanks & Regards
> > >  Prabu.N
> > >
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730590.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730662.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730879.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Please kindly help me.


Regards
Prabu.N


On Wed, Apr 24, 2013 at 2:54 PM, Prabu <pr...@gmail.com> wrote:

> Hi All,
>
> I am facing some issue in my camel code.
>
> Initially i have used java code to route messages from one end to another
> end.
>
> I modified code to route message using camel routing insight of java code.
>
> After modified code,i am facing issue in my code.
>
> 500 Messages stored in DLQ.testQueue
>
> When i try to re-delivery all 500 messages using active-mq API *moveMessageTo
> method.*
>
> 250 or 200 or 100 messages still i can see in DLQ.testQueue.
>
> I feel messages re-delivering,But due to some message coming back again
> into DLQ.
>
> Please kindly help me.
>
> *Regards*
> Prabu.N
>
>
> On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
> ml-node+s465427n5731018h60@n5.nabble.com> wrote:
>
>> Hi
>>
>> Looks like java needs a hand[1], after .to(SCHEDULE_QNAME,ONLINE__QNAME),
>> you can try endChoice()
>>
>> [1]
>>
>> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
>>
>> Taariq
>>
>>
>> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
>> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
>> > wrote:
>>
>> > Thanks Claus for your response..
>> >
>> > I facing some issue in below code
>> >
>> > if condition satisfy i want forward into 2 queues,If not it check
>> second
>> > condition forward into next queue.
>> >
>> >     from(SURVEYINVITATION_QNAME).choice()
>> > *          .when(SCHEDULE_PREDICATE)*
>> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
>> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
>> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
>> >           .otherwise()
>> >               .to(ERQ_QNAME)
>> >          .end();
>> >
>> >
>> > I am getting compilation error,Please correct me what mistake i am
>> making
>> > here
>> >
>> > *Regards*
>> > Prabu.N
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
>> wrote:
>> >
>> > > Hi
>> > >
>> > > If no destinations is returned, then the message is not routed
>> anywhere.
>> > >
>> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
>> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
>> > > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
>>
>> > > wrote:
>> > >
>> > > > *One quick question.*
>> > > >
>> > > >
>> > >
>> >
>> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>>
>> > >
>> > > >
>> > > > @RecipientList()
>> > > >  public Set<String> routeTo(Exchange ex) {
>> > > >
>> > > >  final Set<String> destinations = new HashSet<String>();
>> > > >
>> > > >  //based on condition we add messages header/content ,We add queue
>> > names
>> > > in
>> > > > destinations varible.
>> > > >  //destinations.add("activemq:queue:listqueue")
>> > > >
>> > > >   return destinations;
>> > > >  }
>> > > >
>> > > > some cases,messages content not satisfy any condition and it
>> returning
>> > > > empty destinations set.
>> > > >
>> > > > If destinations set is empty where message will go?.
>> > > >
>> > > > Because,i can't see messages in HHH.InboundQueue and any queues.
>> > > >
>> > > > *Regards*
>> > > > Prabu.N
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
>> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
>> > > wrote:
>> > > >
>> > > >> So for dynamic queue i have to use only recipientlist correct,we
>> can't
>> > > use
>> > > >> .to
>> > > >>
>> > > >> One more question,i can't use otherwise in choice please correct
>> if my
>> > > >> syntax is wrong.
>> > > >>
>> > > >>
>> > > >> from(INBOUND_QUEUE)
>> > > >> .choice().when(header(TYPE).isNotNull())
>> > > >>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> > > >> .otherwise()
>> > > >>    .to(ERQ_QNAME)
>> > > >> .endChoice();
>> > > >>
>> > > >> After execute i am getting following error.
>> > > >>
>> > > >> Error:
>> > > >>
>> > > >> Router.java:22: cannot find symbol
>> > > >> symbol  : method otherwise()
>> > > >> location: class
>> > > >> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> > > >> model.ChoiceDefinition>
>> > > >>            .otherwise()
>> > > >>            ^
>> > > >>
>> > > >>
>> > > >>
>> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
>> > > >> [hidden email] <
>> http://user/SendEmail.jtp?type=node&node=5731013&i=3
>>
>> > >>
>> > > wrote:
>> > > >>
>> > > >>> Hi
>> > > >>>
>> > > >>> Yes recipient list uses an expression for evaluating where to
>> send
>> > the
>> > > >>> message to.
>> > > >>> See its doc
>> > > >>> http://camel.apache.org/recipient-list.html
>> > > >>>
>> > > >>> And this FAQ
>> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> > > >>>
>> > > >>> And there is no performance overhead. eg when you send the
>> message to
>> > > >>> a previous destination, then that endpoints/producer is reused.
>> > > >>>
>> > > >>>
>> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
>> > > >>> <[hidden email] <
>> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
>> > >
>> > > >>> wrote:
>> > > >>>
>> > > >>> > Question:1
>> > > >>> >
>> > > >>> > I am having code like blow.based on condition i want forward
>> into
>> > > >>> dynamic
>> > > >>> > queue.
>> > > >>> >
>> > > >>> >  .when(header(TYPE).isNotNull())
>> > > >>> >
>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> > > >>> >
>> > > >>> > i want to use .to(simple ) insight of .recipientList(simple)
>> > > >>> >
>> > > >>> > Please suggest is it possible?.why it is not possible is there
>> any
>> > > >>> > performance issue if i use .recipientList(simple)
>> > > >>> >
>> > > >>> > Questuon:2
>> > > >>> >
>> > > >>> > Error in code
>> > > >>> >
>> > > >>> > from(INBOUND_QUEUE)
>> > > >>> > .choice().when(header(TYPE).isNotNull())
>> > > >>> >
>> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>> > > >>> > .otherwise()
>> > > >>> >    .to(ERQ_QNAME)
>> > > >>> > .endChoice();
>> > > >>> >
>> > > >>> > After execute i am getting following error.
>> > > >>> >
>> > > >>> > Error:
>> > > >>> >
>> > > >>> > Router.java:22: cannot find symbol
>> > > >>> > symbol  : method otherwise()
>> > > >>> > location: class
>> > > >>> >
>> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
>> > > >>> > model.ChoiceDefinition>
>> > > >>> >            .otherwise()
>> > > >>> >            ^
>> > > >>> >
>> > > >>> > Question:3
>> > > >>> >
>> > > >>> > I having more than 85 queues.Based on condition i want to
>> forward
>> > to
>> > > >>> correct
>> > > >>> > queue.
>> > > >>> >
>> > > >>> > In my route builder i having code below for all 85 queus.
>> > > >>> >
>> > > >>> >   from(ALERT_QNAME).choice()
>> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>> > > >>> >           .otherwise()
>> > > >>> >           .to(ERQ_QNAME)
>> > > >>> >  .end();
>> > > >>> >
>> > > >>> > I feel like because of my code performance getting
>> degrade.Please
>> > > >>> suggest if
>> > > >>> > i am wrong?
>> > > >>> >
>> > > >>> > When i open jconsole i am getting white screen and queues some
>> time
>> > > not
>> > > >>> > showing any attribute?
>> > > >>> >
>> > > >>> > Please kindly help me.
>> > > >>> >
>> > > >>> >
>> > > >>> >
>> > > >>> > --
>> > > >>> > View this message in context:
>> > > >>>
>> > >
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
>> > > >>>
>> > > >>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> > > >>>
>> > > >>>
>> > > >>>
>> > > >>> --
>> > > >>> Claus Ibsen
>> > > >>> -----------------
>> > > >>> Red Hat, Inc.
>> > > >>> FuseSource is now part of Red Hat
>> > > >>> Email: [hidden email]<
>> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
>> > > >>> Web: http://fusesource.com
>> > > >>> Twitter: davsclaus
>> > > >>> Blog: http://davsclaus.com
>> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
>> > > >>>
>> > > >>>
>> > > >>> ------------------------------
>> > > >>>  If you reply to this email, your message will be added to the
>> > > >>> discussion below:
>> > > >>>
>> > > >>>
>> > >
>> > > >>> .
>> > > >>> 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
>> > >
>> > >
>> > > >>>
>> > > >>
>> > > >>
>> > > >>
>> > > >> --
>> > > >> Thanks & Regards
>> > > >>  Prabu.N
>> > > >>
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Thanks & Regards
>> > > >  Prabu.N
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > View this message in context:
>> > >
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
>> > >
>> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
>> > >
>> > >
>> > >
>> > > --
>> > > Claus Ibsen
>> > > -----------------
>> > > Red Hat, Inc.
>> > > FuseSource is now part of Red Hat
>> > > Email: [hidden email]<
>> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
>> > > Web: http://fusesource.com
>> > > Twitter: davsclaus
>> > > Blog: http://davsclaus.com
>> > > Author of Camel in Action: http://www.manning.com/ibsen
>> > >
>> > >
>> > > ------------------------------
>> > >  If you reply to this email, your message will be added to the
>> discussion
>> > > below:
>> > >
>> > >
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
>> > >  To unsubscribe from Camel routing issue, 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
>> > >
>> > >
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> >  Prabu.N
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731018.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731461.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by Chris Wolf <cw...@gmail.com>.
Prabu,

There's a note on the Camel website about a potential compiler error
when using "otherwise()", along with a workaround. Unfortunately, I
can't find it now.

On the other hand, I think this might work:

                from("direct:start")
                .choice().when(header("Type").isNotNull())
                    .recipientList(simple("activemq.Inbound.${header.Type}"))
                .end() // <=== added this to close "when" block
                .otherwise()
                    .to("activemq:queue:Invalid.queue")
                .endChoice();

N.B. this only solved compilation - I didn't actually do a runtime test.

    -Chris

On Mon, Apr 1, 2013 at 7:18 AM, prabumca06@gmail.com
<pr...@gmail.com> wrote:
> Chris,The following code worked fine.
>
> .choice().when(header("Type").isNotNull())
>          .recipientList(simple("activemq.Inbound.${header.Type}"))
> .endChoice()
>
> but,one issue is that.I added *.otherwise()* , it giving error.
>
> .choice().when(header("Type").isNotNull())
>      .recipientList(simple("activemq.Inbound.${header.Type}"))
> *.otherwise()
>     .to("activemq:queue:Invalid.queue")*
> .endChoice();
>
> please kindly help me.
>
>
>
> On Mon, Apr 1, 2013 at 2:32 PM, Prabu <pr...@gmail.com> wrote:
>
>> Like Chris suggest i tried below way
>>
>>
>>  .when(header("TYPE").isNotNull())
>>                .to("activemq:queue.Inbound.${header.Type}")
>>
>>
>> But queue created *${header.Type}* like this not *Inbound.test*
>>
>> Please kindly give me example.
>>
>> *Regards*
>> Prabu.N
>>
>>
>>
>> On Mon, Apr 1, 2013 at 2:03 PM, Claus Ibsen-2 [via Camel] <
>> ml-node+s465427n5730152h14@n5.nabble.com> wrote:
>>
>>> Hi
>>>
>>> See this EIP
>>> http://camel.apache.org/content-enricher.html
>>>
>>> About pollEnrich.
>>>
>>> Though pollEnrich currently does support dynamic uris. Its on the
>>> roadmap,
>>> for Camel 3.0.
>>> It requires an API change and thus isn't so easy to implement currently
>>> on
>>> 2.x.
>>>
>>> You can always use a java bean / camel processor, and consume the ftp
>>> file
>>> from java code.
>>> For example using consumer template.
>>>
>>> As you use FTP you may want to set disconnect=true so the connect is not
>>> remained open after usage.
>>>
>>>
>>>
>>> On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=0>>
>>> wrote:
>>>
>>> > Ok, I'm starting to get it - a little bit.  As for my concrete
>>> > example, so far, I have:
>>> >
>>> >                 from("direct:start")
>>> >                 .beanRef("config")
>>> >                 .convertBodyTo(Document.class)
>>> >                 .recipientList().xquery(
>>> >                     "concat('ftp://'" +
>>> >                     ",//remote[vendorId/@value='CBOE34']/server/@value"
>>> +
>>> >
>>> >
>>> >
>>> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>>>
>>> > +
>>> >                     ",'?noop=true&amp;username='" +
>>> >
>>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
>>> >                     ",'&amp;password='" +
>>> >
>>> > ",//remote[vendorId/@value='CBOE34']/password/@value)", String.class);
>>> >
>>> > Here's the problem - this will create an FTP Producer - that's not
>>> > what I need.  I need a dynamically
>>> > constructed URI for a polling FTP consumer.  I don't think
>>> > "recipientList" will work...   Any ideas?
>>> >
>>> > Thanks,
>>> >
>>> > Chris
>>> >
>>> > On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=1>>
>>> wrote:
>>> > > Hi Claus,
>>> > >
>>> > > I hate to ask this - but I still don't get it.  I thought
>>> > > "recipientList" was for sending to multiple, runtime-defined
>>> > > recipients.  I don't see how this
>>> > > answers the question of sending to one, single recipient, whose URI
>>> is
>>> > > dynamically constructed - and in my use-case the dynamic settings
>>> > > are not in properties - so "simple" (property place-holders) won't
>>> help
>>> > me.
>>> > >
>>> > > Let me give you a concrete example.  I need to do an ftp download and
>>> > > the connection information comes from up-stream in the route in the
>>> > > form of XML (DOM - a Document instance).  Currently, I am trying to
>>> do
>>> > > this with bean binding and method params decorated with @XPath
>>> > > pointing into the Document with the ftp settings and inside the
>>> > > this method doing:
>>> > >
>>> > > FtpComponent ftpComponent = context.getComponent("ftp",
>>> > FtpComponent.class);
>>> > >
>>> > > ..and then attempt to get the endpoint and call createConsumer(...).
>>> > > I'm sure this is not the right way to do it, but I don't see how else
>>> > > - any ideas?
>>> > >
>>> > > Thanks,
>>> > >
>>> > >
>>> > > Chris
>>> > >
>>> > > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=2>>
>>>
>>> > wrote:
>>> > >> Hi
>>> > >>
>>> > >> See this FAQ
>>> > >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>>> > >>
>>> > >>
>>> > >>
>>> > >>
>>> > >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=3>
>>> > >> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=4>>wrote:
>>>
>>> > >>
>>> > >>> Thanks Walzer..
>>> > >>> *
>>> > >>> *
>>> > >>> *Queston1:
>>> > >>>
>>> > >>> *
>>> > >>> *Example*
>>> > >>>
>>> > >>> .when(header("foo").isEqualTo("bar"))
>>> > >>>                     .to("direct:b")
>>> > >>>
>>> > >>> In my case i have to add more than 80 condition and forwards to 80
>>> > >>> different queues.
>>> > >>>
>>> > >>> Above example i can only hard-code queue name,But what i want is
>>> below.
>>> > >>>
>>> > >>> * .when(header("Type").isNotNull())
>>> > >>>     .to("activemq.Inbound."+header("Type"))
>>> > >>> *
>>> > >>>
>>> > >>> Example:If queue type is test,It should forward to *Inbound.test*
>>> > queue.
>>> > >>>
>>> > >>> Above example i tried,but it did not worked,created queue something
>>> > >>> like this *Inbound.header("type")*
>>> > >>>
>>> > >>> *Question2*:
>>> > >>>
>>> > >>> from("direct:a")
>>> > >>>             .multicast().to("direct:b", "direct:c", "direct:d");
>>> > >>>
>>> > >>> Based on messages header and content type i want forward to
>>> different
>>> > >>> queue.
>>> > >>>
>>> > >>> condition will be *OR *and *AND*.How can i do that like above
>>> example.*
>>> > >>> *
>>> > >>>
>>> > >>> Thanks in advance*
>>> > >>> *
>>> > >>>
>>> > >>> *Regards*
>>> > >>>
>>> > >>> Prabu.N
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
>>> > >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=5>>
>>> wrote:
>>> > >>>
>>> > >>> > Hi,
>>> > >>> >
>>> > >>> > you could start by reading Claus´ book (p. 44ff) which has a
>>> perfect
>>> > >>> > example or http://camel.apache.org/content-based-router.html (just
>>>
>>> > >>> > replace the direct: with your queues).
>>> > >>> > If you need to fire your messages to multiple queues:
>>> > >>> > http://camel.apache.org/publish-subscribe-channel.html shows you
>>> the
>>> > >>> > various ways.
>>> > >>> > When you get the concepts you can just "lego" them together.
>>> > >>> >
>>> > >>> > Regards, Thomas.
>>> > >>> >
>>> > >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>>> > >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
>>> > >>> > <[hidden email] <
>>> > http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>>> > >>> >
>>> > >>> > > Hi Claus,
>>> > >>> > >
>>> > >>> > > Thanks so much Clus for help.It is working now.
>>> > >>> > >
>>> > >>> > > I need your guidance for the following requirement.
>>> > >>> > >
>>> > >>> > > 1.I have one *inbound queue* it will receive message frequently
>>> > from my
>>> > >>> > > application.
>>> > >>> > > 2.From *inbound queue* i need camel routing to move message
>>> from
>>> > >>> > > another *message
>>> > >>> > > based inbound queue* based on message header value.
>>> > >>> > > 3.From *message based inbound queue *i* *need camel routing to
>>> move
>>> > >>> > message
>>> > >>> > > to *one or more outbound queue *based on message content*
>>> > >>> > > *
>>> > >>> > >
>>> > >>> > > I need *camel java DSL*sample code for above requirement.*
>>> > >>> > > *
>>> > >>> > > *
>>> > >>> > > *
>>> > >>> > > *Thanks in advance*
>>> > >>> > >
>>> > >>> > >
>>> > >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
>>> > >>> > > [hidden email] <
>>> > http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>>> > >>> > wrote:
>>> > >>> > >
>>> > >>> > >> Hi
>>> > >>> > >>
>>> > >>> > >> Do as the exception tells you. Check route 2. You route from
>>> > >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
>>> > >>> > >>
>>> > >>> > >> Maybe you need to add "activemq:" as prefix so its
>>> > >>> > >> "activemq:Inbound.SSS.TestEvent".
>>> > >>> > >>
>>> > >>> > >>
>>> > >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
>>> > >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
>>> > >>> > >> <[hidden email] <
>>> > http://user/SendEmail.jtp?type=node&node=5730109&i=1
>>> > >>> >>
>>> > >>> >
>>> > >>> > >> wrote:
>>> > >>> > >>
>>> > >>> > >>>
>>> > >>> > >>> I have activemmq  Project in that i have following
>>> requirement
>>> > >>> > >>>
>>> > >>> > >>> 1.Move message from Inbound queue to type based inbound
>>> queue.
>>> > >>> > >>> 2.Move message from Message type inbound queue to outbound
>>> queue
>>> > >>> > >>>
>>> > >>> > >>> I have created two bean for to achieve this.
>>> > >>> > >>>
>>> > >>> > >>> 1.one for move from inbound to message type  inbound queue
>>> > >>> > >>> 2.one for move from inbound to outbound queue.
>>> > >>> > >>>
>>> > >>> > >>> I have following entry in camel.xml
>>> > >>> > >>>
>>> > >>> > >>>   <camelContext id="camel" xmlns="
>>> > >>> > http://camel.apache.org/schema/spring">
>>> > >>> > >>
>>> > >>> > >>>
>>> > >>> > >>>                <routeBuilder ref="routeBuilder" />
>>> > >>> > >>>            <routeBuilder ref="routeBuilder1" />
>>> > >>> > >>>
>>> > >>> > >>>    </camelContext>
>>> > >>> > >>>
>>> > >>> > >>>    <bean id="routeBuilder"
>>> > >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
>>> > >>> > >>>    <bean id="recipientsGenerator"
>>> > >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
>>> > >>> > >>>    <bean id="routeBuilder1"
>>> > >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
>>> > >>> > >>>    <bean id="recipientsGenerator1"
>>> > >>> > >>> class="com.camel.routes.RecipientListBean"/>
>>> > >>> > >>>
>>> > >>> > >>> When i run application i am getting following error.
>>> > >>> > >>>
>>> > >>> > >>> * java.lang.Exception:
>>> org.apache.camel.RuntimeCamelException:
>>> > >>> > >>> org.apache.camel.Fa
>>> > >>> > >>> iledToCreateRouteException: Failed to create route route2:
>>> > >>> > >>> Route[[From[Inbound.G
>>> > >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No
>>> endpoint
>>> > >>> > could
>>> > >>> > >> be
>>> > >>> > >>> found
>>> > >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath
>>> contains
>>> > the
>>> > >>> > >> needed
>>> > >>> > >>> Cam
>>> > >>> > >>> el component jar.*
>>> > >>> > >>>
>>> > >>> > >>> I am not sure i am missing any configuration,Please kindly
>>> help
>>> > me
>>> > >>> > >>>
>>> > >>> > >>>
>>> > >>> > >>>
>>> > >>> > >>>
>>> > >>> > >>> --
>>> > >>> > >>> View this message in context:
>>> > >>> > >>
>>> > http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>>> > >>> > >>> Sent from the Camel - Users mailing list archive at
>>> Nabble.com.
>>> > >>> > >>
>>> > >>> > >>
>>> > >>> > >>
>>> > >>> > >> --
>>> > >>> > >> Claus Ibsen
>>> > >>> > >> -----------------
>>> > >>> > >> Red Hat, Inc.
>>> > >>> > >> FuseSource is now part of Red Hat
>>> > >>> > >> Email: [hidden email]<
>>> > >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
>>> > >>> > >> Web: http://fusesource.com
>>> > >>> > >> Twitter: davsclaus
>>> > >>> > >> Blog: http://davsclaus.com
>>> > >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
>>> > >>> > >>
>>> > >>> > >>
>>> > >>> > >> ------------------------------
>>> > >>> > >> If you reply to this email, your message will be added to the
>>> > >>> > discussion
>>> > >>> > >> below:
>>> > >>> > >>
>>> > >>> > >>
>>> > >>> >
>>> > >>> > >> .
>>> > >>> > >> 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
>>> > >>> >
>>> > >>> >
>>> > >>> > >>
>>> > >>> > >
>>> > >>> > >
>>> > >>> > >
>>> > >>> > > --
>>> > >>> > > Thanks & Regards
>>> > >>> > > Prabu.N
>>> > >>> > >
>>> > >>> > >
>>> > >>> > >
>>> > >>> > >
>>> > >>> > > --
>>> > >>> > > View this message in context:
>>> > >>> >
>>> > >>>
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>>> > >>> >
>>> > >>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
>>> > >>> >
>>> > >>> >
>>> > >>> >
>>> > >>> > ------------------------------
>>> > >>> >  If you reply to this email, your message will be added to the
>>> > discussion
>>> > >>> > below:
>>> > >>> >
>>> > >>> >
>>> > >>>
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>>> > >>> >  To unsubscribe from Camel routing issue, 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
>>> > >>> >
>>> > >>> >
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>> --
>>> > >>> Thanks & Regards
>>> > >>>  Prabu.N
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>> --
>>> > >>> View this message in context:
>>> > >>>
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>>> > >>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>> > >>>
>>> > >>
>>> > >>
>>> > >>
>>> > >> --
>>> > >> Claus Ibsen
>>> > >> -----------------
>>> > >> Red Hat, Inc.
>>> > >> FuseSource is now part of Red Hat
>>> > >> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=6>
>>> > >> Web: http://fusesource.com
>>> > >> Twitter: davsclaus
>>> > >> Blog: http://davsclaus.com
>>> > >> Author of Camel in Action: http://www.manning.com/ibsen
>>> >
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> Red Hat, Inc.
>>> FuseSource is now part of Red Hat
>>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=7>
>>> Web: http://fusesource.com
>>> Twitter: davsclaus
>>> Blog: http://davsclaus.com
>>> Author of Camel in Action: http://www.manning.com/ibsen
>>>
>>>
>>> ------------------------------
>>>  If you reply to this email, your message will be added to the
>>> discussion below:
>>>
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730152.html
>>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>>> .
>>> 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>
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>>  Prabu.N
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730157.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Chris,The following code worked fine.

.choice().when(header("Type").isNotNull())
         .recipientList(simple("activemq.Inbound.${header.Type}"))
.endChoice()

but,one issue is that.I added *.otherwise()* , it giving error.

.choice().when(header("Type").isNotNull())
     .recipientList(simple("activemq.Inbound.${header.Type}"))
*.otherwise()
    .to("activemq:queue:Invalid.queue")*
.endChoice();

please kindly help me.



On Mon, Apr 1, 2013 at 2:32 PM, Prabu <pr...@gmail.com> wrote:

> Like Chris suggest i tried below way
>
>
>  .when(header("TYPE").isNotNull())
>                .to("activemq:queue.Inbound.${header.Type}")
>
>
> But queue created *${header.Type}* like this not *Inbound.test*
>
> Please kindly give me example.
>
> *Regards*
> Prabu.N
>
>
>
> On Mon, Apr 1, 2013 at 2:03 PM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5730152h14@n5.nabble.com> wrote:
>
>> Hi
>>
>> See this EIP
>> http://camel.apache.org/content-enricher.html
>>
>> About pollEnrich.
>>
>> Though pollEnrich currently does support dynamic uris. Its on the
>> roadmap,
>> for Camel 3.0.
>> It requires an API change and thus isn't so easy to implement currently
>> on
>> 2.x.
>>
>> You can always use a java bean / camel processor, and consume the ftp
>> file
>> from java code.
>> For example using consumer template.
>>
>> As you use FTP you may want to set disconnect=true so the connect is not
>> remained open after usage.
>>
>>
>>
>> On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=0>>
>> wrote:
>>
>> > Ok, I'm starting to get it - a little bit.  As for my concrete
>> > example, so far, I have:
>> >
>> >                 from("direct:start")
>> >                 .beanRef("config")
>> >                 .convertBodyTo(Document.class)
>> >                 .recipientList().xquery(
>> >                     "concat('ftp://'" +
>> >                     ",//remote[vendorId/@value='CBOE34']/server/@value"
>> +
>> >
>> >
>> >
>> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>>
>> > +
>> >                     ",'?noop=true&amp;username='" +
>> >
>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
>> >                     ",'&amp;password='" +
>> >
>> > ",//remote[vendorId/@value='CBOE34']/password/@value)", String.class);
>> >
>> > Here's the problem - this will create an FTP Producer - that's not
>> > what I need.  I need a dynamically
>> > constructed URI for a polling FTP consumer.  I don't think
>> > "recipientList" will work...   Any ideas?
>> >
>> > Thanks,
>> >
>> > Chris
>> >
>> > On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=1>>
>> wrote:
>> > > Hi Claus,
>> > >
>> > > I hate to ask this - but I still don't get it.  I thought
>> > > "recipientList" was for sending to multiple, runtime-defined
>> > > recipients.  I don't see how this
>> > > answers the question of sending to one, single recipient, whose URI
>> is
>> > > dynamically constructed - and in my use-case the dynamic settings
>> > > are not in properties - so "simple" (property place-holders) won't
>> help
>> > me.
>> > >
>> > > Let me give you a concrete example.  I need to do an ftp download and
>> > > the connection information comes from up-stream in the route in the
>> > > form of XML (DOM - a Document instance).  Currently, I am trying to
>> do
>> > > this with bean binding and method params decorated with @XPath
>> > > pointing into the Document with the ftp settings and inside the
>> > > this method doing:
>> > >
>> > > FtpComponent ftpComponent = context.getComponent("ftp",
>> > FtpComponent.class);
>> > >
>> > > ..and then attempt to get the endpoint and call createConsumer(...).
>> > > I'm sure this is not the right way to do it, but I don't see how else
>> > > - any ideas?
>> > >
>> > > Thanks,
>> > >
>> > >
>> > > Chris
>> > >
>> > > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=2>>
>>
>> > wrote:
>> > >> Hi
>> > >>
>> > >> See this FAQ
>> > >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> > >>
>> > >>
>> > >>
>> > >>
>> > >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=3>
>> > >> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=4>>wrote:
>>
>> > >>
>> > >>> Thanks Walzer..
>> > >>> *
>> > >>> *
>> > >>> *Queston1:
>> > >>>
>> > >>> *
>> > >>> *Example*
>> > >>>
>> > >>> .when(header("foo").isEqualTo("bar"))
>> > >>>                     .to("direct:b")
>> > >>>
>> > >>> In my case i have to add more than 80 condition and forwards to 80
>> > >>> different queues.
>> > >>>
>> > >>> Above example i can only hard-code queue name,But what i want is
>> below.
>> > >>>
>> > >>> * .when(header("Type").isNotNull())
>> > >>>     .to("activemq.Inbound."+header("Type"))
>> > >>> *
>> > >>>
>> > >>> Example:If queue type is test,It should forward to *Inbound.test*
>> > queue.
>> > >>>
>> > >>> Above example i tried,but it did not worked,created queue something
>> > >>> like this *Inbound.header("type")*
>> > >>>
>> > >>> *Question2*:
>> > >>>
>> > >>> from("direct:a")
>> > >>>             .multicast().to("direct:b", "direct:c", "direct:d");
>> > >>>
>> > >>> Based on messages header and content type i want forward to
>> different
>> > >>> queue.
>> > >>>
>> > >>> condition will be *OR *and *AND*.How can i do that like above
>> example.*
>> > >>> *
>> > >>>
>> > >>> Thanks in advance*
>> > >>> *
>> > >>>
>> > >>> *Regards*
>> > >>>
>> > >>> Prabu.N
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
>> > >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=5>>
>> wrote:
>> > >>>
>> > >>> > Hi,
>> > >>> >
>> > >>> > you could start by reading Claus´ book (p. 44ff) which has a
>> perfect
>> > >>> > example or http://camel.apache.org/content-based-router.html (just
>>
>> > >>> > replace the direct: with your queues).
>> > >>> > If you need to fire your messages to multiple queues:
>> > >>> > http://camel.apache.org/publish-subscribe-channel.html shows you
>> the
>> > >>> > various ways.
>> > >>> > When you get the concepts you can just "lego" them together.
>> > >>> >
>> > >>> > Regards, Thomas.
>> > >>> >
>> > >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>> > >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
>> > >>> > <[hidden email] <
>> > http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>> > >>> >
>> > >>> > > Hi Claus,
>> > >>> > >
>> > >>> > > Thanks so much Clus for help.It is working now.
>> > >>> > >
>> > >>> > > I need your guidance for the following requirement.
>> > >>> > >
>> > >>> > > 1.I have one *inbound queue* it will receive message frequently
>> > from my
>> > >>> > > application.
>> > >>> > > 2.From *inbound queue* i need camel routing to move message
>> from
>> > >>> > > another *message
>> > >>> > > based inbound queue* based on message header value.
>> > >>> > > 3.From *message based inbound queue *i* *need camel routing to
>> move
>> > >>> > message
>> > >>> > > to *one or more outbound queue *based on message content*
>> > >>> > > *
>> > >>> > >
>> > >>> > > I need *camel java DSL*sample code for above requirement.*
>> > >>> > > *
>> > >>> > > *
>> > >>> > > *
>> > >>> > > *Thanks in advance*
>> > >>> > >
>> > >>> > >
>> > >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
>> > >>> > > [hidden email] <
>> > http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>> > >>> > wrote:
>> > >>> > >
>> > >>> > >> Hi
>> > >>> > >>
>> > >>> > >> Do as the exception tells you. Check route 2. You route from
>> > >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
>> > >>> > >>
>> > >>> > >> Maybe you need to add "activemq:" as prefix so its
>> > >>> > >> "activemq:Inbound.SSS.TestEvent".
>> > >>> > >>
>> > >>> > >>
>> > >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
>> > >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
>> > >>> > >> <[hidden email] <
>> > http://user/SendEmail.jtp?type=node&node=5730109&i=1
>> > >>> >>
>> > >>> >
>> > >>> > >> wrote:
>> > >>> > >>
>> > >>> > >>>
>> > >>> > >>> I have activemmq  Project in that i have following
>> requirement
>> > >>> > >>>
>> > >>> > >>> 1.Move message from Inbound queue to type based inbound
>> queue.
>> > >>> > >>> 2.Move message from Message type inbound queue to outbound
>> queue
>> > >>> > >>>
>> > >>> > >>> I have created two bean for to achieve this.
>> > >>> > >>>
>> > >>> > >>> 1.one for move from inbound to message type  inbound queue
>> > >>> > >>> 2.one for move from inbound to outbound queue.
>> > >>> > >>>
>> > >>> > >>> I have following entry in camel.xml
>> > >>> > >>>
>> > >>> > >>>   <camelContext id="camel" xmlns="
>> > >>> > http://camel.apache.org/schema/spring">
>> > >>> > >>
>> > >>> > >>>
>> > >>> > >>>                <routeBuilder ref="routeBuilder" />
>> > >>> > >>>            <routeBuilder ref="routeBuilder1" />
>> > >>> > >>>
>> > >>> > >>>    </camelContext>
>> > >>> > >>>
>> > >>> > >>>    <bean id="routeBuilder"
>> > >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
>> > >>> > >>>    <bean id="recipientsGenerator"
>> > >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
>> > >>> > >>>    <bean id="routeBuilder1"
>> > >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
>> > >>> > >>>    <bean id="recipientsGenerator1"
>> > >>> > >>> class="com.camel.routes.RecipientListBean"/>
>> > >>> > >>>
>> > >>> > >>> When i run application i am getting following error.
>> > >>> > >>>
>> > >>> > >>> * java.lang.Exception:
>> org.apache.camel.RuntimeCamelException:
>> > >>> > >>> org.apache.camel.Fa
>> > >>> > >>> iledToCreateRouteException: Failed to create route route2:
>> > >>> > >>> Route[[From[Inbound.G
>> > >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No
>> endpoint
>> > >>> > could
>> > >>> > >> be
>> > >>> > >>> found
>> > >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath
>> contains
>> > the
>> > >>> > >> needed
>> > >>> > >>> Cam
>> > >>> > >>> el component jar.*
>> > >>> > >>>
>> > >>> > >>> I am not sure i am missing any configuration,Please kindly
>> help
>> > me
>> > >>> > >>>
>> > >>> > >>>
>> > >>> > >>>
>> > >>> > >>>
>> > >>> > >>> --
>> > >>> > >>> View this message in context:
>> > >>> > >>
>> > http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>> > >>> > >>> Sent from the Camel - Users mailing list archive at
>> Nabble.com.
>> > >>> > >>
>> > >>> > >>
>> > >>> > >>
>> > >>> > >> --
>> > >>> > >> Claus Ibsen
>> > >>> > >> -----------------
>> > >>> > >> Red Hat, Inc.
>> > >>> > >> FuseSource is now part of Red Hat
>> > >>> > >> Email: [hidden email]<
>> > >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
>> > >>> > >> Web: http://fusesource.com
>> > >>> > >> Twitter: davsclaus
>> > >>> > >> Blog: http://davsclaus.com
>> > >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
>> > >>> > >>
>> > >>> > >>
>> > >>> > >> ------------------------------
>> > >>> > >> If you reply to this email, your message will be added to the
>> > >>> > discussion
>> > >>> > >> below:
>> > >>> > >>
>> > >>> > >>
>> > >>> >
>> > >>> > >> .
>> > >>> > >> 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
>> > >>> >
>> > >>> >
>> > >>> > >>
>> > >>> > >
>> > >>> > >
>> > >>> > >
>> > >>> > > --
>> > >>> > > Thanks & Regards
>> > >>> > > Prabu.N
>> > >>> > >
>> > >>> > >
>> > >>> > >
>> > >>> > >
>> > >>> > > --
>> > >>> > > View this message in context:
>> > >>> >
>> > >>>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>> > >>> >
>> > >>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
>> > >>> >
>> > >>> >
>> > >>> >
>> > >>> > ------------------------------
>> > >>> >  If you reply to this email, your message will be added to the
>> > discussion
>> > >>> > below:
>> > >>> >
>> > >>> >
>> > >>>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>> > >>> >  To unsubscribe from Camel routing issue, 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
>> > >>> >
>> > >>> >
>> > >>>
>> > >>>
>> > >>>
>> > >>> --
>> > >>> Thanks & Regards
>> > >>>  Prabu.N
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>> --
>> > >>> View this message in context:
>> > >>>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>> > >>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> > >>>
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Claus Ibsen
>> > >> -----------------
>> > >> Red Hat, Inc.
>> > >> FuseSource is now part of Red Hat
>> > >> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=6>
>> > >> Web: http://fusesource.com
>> > >> Twitter: davsclaus
>> > >> Blog: http://davsclaus.com
>> > >> Author of Camel in Action: http://www.manning.com/ibsen
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=7>
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730152.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730157.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Please kindly help me..

Regards
Prabu.N


On Mon, Apr 15, 2013 at 1:36 PM, Prabu <pr...@gmail.com> wrote:

> Hi Chris/Claus,
>
> *Question:1*
>
> I am having code like blow.based on condition i want forward into dynamic
> queue.
>
>  .when(header(TYPE).isNotNull())
>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>
> i want to use .to(simple ) insight of .recipientList(simple)
>
> Please suggest is it possible?.why it is not possible is there any
> performance issue if i use .recipientList(simple)
>
> *Question:2*
>
>  I having more than 85 queues.Based on condition i want to forward to
> correct queue.
>
> In my route builder i having code below for all 85 queus.
>
>   from(ALERT_QNAME).choice()
>           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>           .otherwise()
>           .to(ERQ_QNAME)
>  .end();
>
> I feel like because of my code performance getting degrade.Please suggest
> if i am wrong?
>
> When i open jconsole i am getting white screen and queues some time not
> showing any attribute?
>
>
> Please kindly help me.
>
> *Regards*
> Prabu.N
>
>
> On Wed, Apr 10, 2013 at 7:39 PM, Chris Wolf [via Camel] <
> ml-node+s465427n5730662h24@n5.nabble.com> wrote:
>
>> You're asking about a problem with "CARD_EVENT_PREDICATE" without
>> including
>> the definition of that?
>>
>>
>> On Tue, Apr 9, 2013 at 8:31 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=0>
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730662&i=1>>wrote:
>>
>>
>> > Hi Chris,
>> >
>> > from(CARD_TYPE_SPECIFIC_QNAME).choice()
>> > .when(SCHEDULE_PREDICATE).multicast().to(CARD_QNAME,SCHEDULE_QNAME);
>> > .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
>> > .otherwise()
>> > .setHeader(PROPERTY_ORIGINAL_DESTINATION,
>> > constant(PROPERTY_ORIGINAL_DESTINATION_VALUE))
>> > .to(ERQ_QNAME)
>> > .end();
>> >
>> > When i compile above code i am getting followin
>> >
>> > lder.java:115: illegal start of expression
>> >     .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
>> >               ^
>> >
>> > Please kindly help me,i am doing any syntax mistake here
>> >
>> > *Regards*
>> > Prabu.N
>> >
>> >
>> >
>> >
>> >
>> > On Fri, Apr 5, 2013 at 3:58 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=2>>
>> wrote:
>> >
>> > > Thanks Chris/Claus it worked,
>> > >
>> > >
>> > > Hi Chris/Claus,
>> > >
>> > > When running active-mq 5.8 i am getting following issue,do you have
>> any
>> > > idea.
>> > >
>> > > 2013-04-05 05:26:16,312 | WARN  | Async error occurred:
>> > > java.lang.IllegalStateException: Cannot add a consumer to a
>> connection
>> > that
>> > > had not been registered:
>> > >
>> > >
>> > > *Regards*
>> > > Prabu.N
>> > >
>> > >
>> > >
>> > >
>> > > On Thu, Apr 4, 2013 at 6:55 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=3>>
>> wrote:
>> > >
>> > >> 1.) You're NOT using my code - it's still the same as you had before
>> > >> 2.) You're still calling setHeader(java.lang.String,
>> java.lang.String)
>> > >>      even though I tried to tell you that it has to be
>> > >>      setHeader(java.lang.String, org.apache.camel.Expression)
>> > >>
>> > >> On Wed, Apr 3, 2013 at 2:51 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=4>>
>> wrote:
>> > >> > Please kindly help me...
>> > >> >
>> > >> > On Apr 3, 2013 8:54 PM, "Prabu" <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=5>>
>> wrote:
>> > >> >>
>> > >> >> Hi Chris,
>> > >> >>
>> > >> >> I used your code.But i am getting following compilation error
>> > >> >>
>> > >> >> lder.java:92: cannot find symbol
>> > >> >> symbol  : method setHeader(java.lang.String,java.lang.String)
>> > >> >> location: class org.apache.camel.model.ChoiceDefinition
>> > >> >>                   .otherwise().setHeader("MyHeader","sdfsdf")
>> > >> >>
>> > >> >>
>> > >> >> Note: I am using camel 2.10 version
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >> On Wed, Apr 3, 2013 at 8:22 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=6>>
>>
>> > >> wrote:
>> > >> >>>
>> > >> >>> Hi Prabu,
>> > >> >>>
>> > >> >>> I don't mind helping, but could you continue to use the
>> > >> >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=7>rather then my private email?  That way, if
>> > >> >>> other people have similar issues, they can benefit.
>> > >> >>>
>> > >> >>>
>> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
>> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> > >> >>>            .otherwise()
>> > >> >>>            .setHeader("MyHeader", constant("some-value"))  //
>> <===
>> > Set
>> > >> >>> Header
>> > >> >>>            .to(ERQ_QNAME)
>> > >> >>>    .end();
>> > >> >>>
>> > >> >>> This technique will use the "simple" language function
>> "constant" to
>> > >> >>> set a string constant value.
>> > >> >>> If the value you need to set is dynamic, then you could use a
>> > >> >>> property placeholder.
>> > >> >>>
>> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
>> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> > >> >>>            .otherwise()
>> > >> >>>            .setHeader("MyHeader", constant("{{some-prop}}"))  //
>> > <===
>> > >> Set
>> > >> >>> Header
>> > >> >>>            .to(ERQ_QNAME)
>> > >> >>>    .end();
>> > >> >>>
>> > >> >>> There are even more sophisticated ways to acquire dynamic
>> values:
>> > >> >>>
>> > >> >>> http://camel.apache.org/python.html
>> > >> >>>
>> > >> >>> Regards,
>> > >> >>>
>> > >> >>> Chris
>> > >> >>>
>> > >> >>> On Wed, Apr 3, 2013 at 9:52 AM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=8>>
>> wrote:
>> > >> >>> > I have code like this,
>> > >> >>> >
>> > >> >>> >     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice()
>> > >> >>> >
>> .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> > >> >>> >           .otherwise().to(ERQ_QNAME)
>> > >> >>> >    .end();
>> > >> >>> >
>> > >> >>> >     from(DEACTIVATIN_TYPE_SPECIFIC_QNAME).choice()
>> > >> >>> >
>> > >> >>> > .when(ALERT_FAILURE_HANDLER_PREDICATE).to(ALERT_FAILURE_QNAME)
>> > >> >>> >           .otherwise().to(ERQ_QNAME)
>> > >> >>> >     .end();
>> > >> >>> >
>> > >> >>> > I want to set some values to header inside otherwise that is
>> > before
>> > >> >>> > message
>> > >> >>> > move to ERQ_QNAME.
>> > >> >>> >
>> > >> >>> > please kindly help me how to do that.
>> > >> >>> >
>> > >> >>> > Regards
>> > >> >>> > Prabu.N
>> > >> >>> >
>> > >> >>> >
>> > >> >>> > On Tue, Apr 2, 2013 at 10:52 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=9>>
>>
>> > >> wrote:
>> > >> >>> >>
>> > >> >>> >> No,i didn't received ...
>> > >> >>> >>
>> > >> >>> >> Regards
>> > >> >>> >> Prabu.N
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >> On Tue, Apr 2, 2013 at 7:31 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=10>
>> > >
>> > >> >>> >> wrote:
>> > >> >>> >>>
>> > >> >>> >>> Hi Prabu,
>> > >> >>> >>>
>> > >> >>> >>> Just out of curiosity - I am wondering if saw my email I
>> sent
>> > >> >>> >>> yesterday in response to your question?
>> > >> >>> >>> I sent it to "[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=11>"
>> with the subject,
>> > >> >>> >>> "Content-based routing with Expressions and Predicates"...
>> > >> >>> >>>
>> > >> >>> >>> Regards,
>> > >> >>> >>>
>> > >> >>> >>> Chris
>> > >> >>> >>>
>> > >> >>> >>> On Tue, Apr 2, 2013 at 4:17 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=12>
>> > >> >>> >>> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=13>>
>> wrote:
>> > >> >>> >>> > I have found solution in internet using Predicate  we can
>> > >> achieve
>> > >> >>> >>> > this,
>> > >> >>> >>> >
>> > >> >>> >>> > But,one doubt in the link
>> > >> >>> >>> > http://camel.apache.org/predicate.html,Theymentioned that
>> we
>> > >> can
>> > >> >>> >>> > use
>> > >> >>> >>> > AND and OR in Predicate
>> > >> >>> >>> >
>> > >> >>> >>> > I have added below code in project,But i am getting
>> > compilation
>> > >> >>> >>> > error.Please kindly help
>> > >> >>> >>> >
>> > >> >>> >>> > *Predicate god = and(admin, or(body().contains("Camel
>> Rider"),
>> > >> >>> >>> > header("type").isEqualTo("god")));*
>> > >> >>> >>> >
>> > >> >>> >>> > *Thanks*
>> > >> >>> >>> > Prabu.N
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=14>>
>>
>> > >> wrote:
>> > >> >>> >>> >
>> > >> >>> >>> >> Hi *Chris / **Claus*,
>> > >> >>> >>> >>
>> > >> >>> >>> >> I have one *Inbound* queue,based on header and content
>> type,I
>> > >> want
>> > >> >>> >>> >> forward to outbound queue.
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Example 1:
>> > >> >>> >>> >> *
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Inbound.queue name : **Inbound.Test.DDD
>> > >> >>> >>> >> Outbound.queue name : SOURHQueueName
>> > >> >>> >>> >>
>> > >> >>> >>> >> *
>> > >> >>> >>> >> *Criteria or Condition :
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
>> > >> >>> >>> >>    *AND*
>> > >> >>> >>> >> Message *Type* value is : *card.test *or*
>> card.expiry.test*
>> > >> >>> >>> >>
>> > >> >>> >>> >> *Example 2:*
>> > >> >>> >>> >>
>> > >> >>> >>> >> *Inbound.queue name : **Inbound.Test.SSS
>> > >> >>> >>> >> Outbound.queue name : WESTQueueName
>> > >> >>> >>> >> *
>> > >> >>> >>> >> *Criteria or Condition :*
>> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
>> > >> >>> >>> >>  *AND
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Message *Type *value *start with* :*card.event*
>> > >> >>> >>> >>
>> > >> >>> >>> >> I want achieve this using camel routing java DSL.
>> > >> >>> >>> >>
>> > >> >>> >>> >> Please help me.How can i use AND,OR and regular
>> expression in
>> > >> >>> >>> >> camel
>> > >> >>> >>> >> routing
>> > >> >>> >>> >>
>> > >> >>> >>> >> *Regards*
>> > >> >>> >>> >> Prabu.N
>> > >> >>> >>> >>
>> > >> >>> >>> >>
>> > >> >>> >>> >> On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
>> > >> >>> >>> >> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=15>>
>> wrote:
>> > >> >>> >>> >>
>> > >> >>> >>> >>> Hi Claus,
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> Thanks for the response - I could not see any obvious
>> way to
>> > >> >>> >>> >>> configure
>> > >> >>> >>> >>> an FTP Consumer at ***runtime***,
>> > >> >>> >>> >>> either via bean, processor or consumer template.  If you
>> > have
>> > >> a
>> > >> >>> >>> >>> concrete example, that would be great to see...
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> ...otherwise, here's the solution I came up with:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>     -Chris
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   // simulate incoming message from JMS...
>> > >> >>> >>> >>>   from("timer:kickoff?repeatCount=1")
>> > >> >>> >>> >>>   .to("direct:start");
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   // upon receipt of FTP config from JMS, invoke
>> > >>  FtpConfigurer
>> > >> >>> >>> >>> bean
>> > >> >>> >>> >>> to reconfigure
>> > >> >>> >>> >>>   // FTP route, then start it...
>> > >> >>> >>> >>>   from("direct:start")
>> > >> >>> >>> >>>   .beanRef("configRdr") // config reader bean not shown
>> here
>> > >> >>> >>> >>>   .convertBodyTo(Document.class)
>> > >> >>> >>> >>>   // sets a bunch of headers from DOM, e.g.:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> String.class)
>> > >> >>> >>> >>>   .setHeader("ftp-route-id", constant("ftp.route"))
>> > >> >>> >>> >>>   .beanRef("ftpConfigurer");
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   // FTP route will only be started by FtpConfigurer
>> bean
>> > >> after
>> > >> >>> >>> >>> it's
>> > >> >>> >>> >>> dynamically re-configured...
>> > >> >>> >>> >>>   from("ftp://bogushost/bogusdir?startScheduler=false")
>> //
>> > >> the
>> > >> >>> >>> >>> URI
>> > >> >>> >>> >>> will be reconfigured...
>> > >> >>> >>> >>>   .routeId("ftp.route").noAutoStartup()
>> > >> >>> >>> >>>   .log("Received file ${file:onlyname}")
>> > >> >>> >>> >>>   .to("file:/tmp/local/data");
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   public class FtpConfigurer {
>> > >> >>> >>> >>>     public void configureFtpConsumer(Exchange exchange)
>> > throws
>> > >> >>> >>> >>> Exception
>> > >> >>> >>> >>> {
>> > >> >>> >>> >>>         CamelContext context = exchange.getContext();
>> > >> >>> >>> >>>         Map<String, Object> headers =
>> > >> >>> >>> >>> exchange.getIn().getHeaders();
>> > >> >>> >>> >>>         Map<String, Object> parameters = new
>> HashMap<String,
>> > >> >>> >>> >>> Object>();
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // Filter headers for ftp-config specific
>> headers...
>> > >> >>> >>> >>>         for (Map.Entry<String, Object> entry :
>> > >> >>> >>> >>> headers.entrySet()) {
>> > >> >>> >>> >>>             String key = entry.getKey();
>> > >> >>> >>> >>>             if (key.startsWith("ftp-config."))
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> parameters.put(key.substring("ftp-config.".length()),
>> > >> >>> >>> >>> entry.getValue());
>> > >> >>> >>> >>>         }
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         String routeId =
>> > >> >>> >>> >>> exchange.getIn().getHeader("ftp-route-id",
>> > >> >>> >>> >>> String.class);
>> > >> >>> >>> >>>         Route ftpRoute = context.getRoute(routeId);
>> > >> >>> >>> >>>         FtpConsumer c = (FtpConsumer)
>> > ftpRoute.getConsumer();
>> > >> >>> >>> >>>         FtpEndpoint<FTPFile> rfe =
>> (FtpEndpoint<FTPFile>)
>> > >> >>> >>> >>> c.getEndpoint();
>> > >> >>> >>> >>>         FtpConfiguration rfc = rfe.getConfiguration();
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // Need to crack open FtpConsumer's
>> "endpointPath"
>> > >> field
>> > >> >>> >>> >>> since
>> > >> >>> >>> >>>         // there's no mutator (setter)
>> > >> >>> >>> >>>         Class<?> cls = c.getClass();
>> > >> >>> >>> >>>         Field endpointPath_fld =
>> > >> >>> >>> >>> cls.getDeclaredField("endpointPath");
>> > >> >>> >>> >>>         endpointPath_fld.setAccessible(true);
>> > >> >>> >>> >>>         endpointPath_fld.set(c,
>> > >> >>> >>> >>> (String)parameters.get("directory"));
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // Need to crack open FtpEndpoint, actually
>> > >> >>> >>> >>> DefaultEndpoint -
>> > >> >>> >>> >>> the ultimate base class
>> > >> >>> >>> >>>         // since there's no mutator (setter) for the
>> > >> >>> >>> >>> "endpointUri"
>> > >> >>> >>> >>> field
>> > >> >>> >>> >>>         cls = rfe.getClass();
>> > >> >>> >>> >>>         Field endpointUri_fld = null;
>> > >> >>> >>> >>>         while (endpointUri_fld == null) {
>> > >> >>> >>> >>>             // TODO: maybe change logic to just stop at
>> > >> >>> >>> >>> class=DefaultEndpoint
>> > >> >>> >>> >>>             // rather then using NoSuchFieldException
>> > >> >>> >>> >>>             try {
>> > >> >>> >>> >>>                 endpointUri_fld =
>> > >> >>> >>> >>> cls.getDeclaredField("endpointUri");
>> > >> >>> >>> >>>             } catch (NoSuchFieldException nsfe) {
>> > >> >>> >>> >>>                 cls = cls.getSuperclass();
>> > >> >>> >>> >>>             }
>> > >> >>> >>> >>>         }
>> > >> >>> >>> >>>         endpointUri_fld.setAccessible(true);
>> > >> >>> >>> >>>         endpointUri_fld.set(rfe,
>> > >> >>> >>> >>>             String.format("ftp://%s/%s",
>> > >> >>> >>> >>> (String)parameters.get("host"),
>> > >> >>> >>> >>> (String)parameters.get("directory")));
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // set reference properties first as they use #
>> > syntax
>> > >> >>> >>> >>> that
>> > >> >>> >>> >>> fools the regular properties setter
>> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
>> rfc,
>> > >> >>> >>> >>> parameters);
>> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfc,
>> > >> parameters);
>> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
>> rfe,
>> > >> >>> >>> >>> parameters);
>> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfe,
>> > >> parameters);
>> > >> >>> >>> >>>         c.setStartScheduler(true);
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         context.startRoute(routeId);
>> > >> >>> >>> >>>   }
>> > >> >>> >>> >>> }
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden
>> > >> >>> >>> >>> email]<
>> http://user/SendEmail.jtp?type=node&node=5730166&i=0
>> > >>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> > Hi
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > See this EIP
>> > >> >>> >>> >>> > http://camel.apache.org/content-enricher.html
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > About pollEnrich.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > Though pollEnrich currently does support dynamic uris.
>> Its
>> > >> on
>> > >> >>> >>> >>> > the
>> > >> >>> >>> >>> roadmap,
>> > >> >>> >>> >>> > for Camel 3.0.
>> > >> >>> >>> >>> > It requires an API change and thus isn't so easy to
>> > >> implement
>> > >> >>> >>> >>> > currently
>> > >> >>> >>> >>> on
>> > >> >>> >>> >>> > 2.x.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > You can always use a java bean / camel processor, and
>> > >> consume
>> > >> >>> >>> >>> > the
>> > >> >>> >>> >>> > ftp
>> > >> >>> >>> >>> file
>> > >> >>> >>> >>> > from java code.
>> > >> >>> >>> >>> > For example using consumer template.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > As you use FTP you may want to set disconnect=true so
>> the
>> > >> >>> >>> >>> > connect
>> > >> >>> >>> >>> > is
>> > >> >>> >>> >>> not
>> > >> >>> >>> >>> > remained open after usage.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden
>> > >> >>> >>> >>> > email]<
>> > http://user/SendEmail.jtp?type=node&node=5730166&i=1
>> > >> >>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >> Ok, I'm starting to get it - a little bit.  As for my
>> > >> concrete
>> > >> >>> >>> >>> >> example, so far, I have:
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>                 from("direct:start")
>> > >> >>> >>> >>> >>                 .beanRef("config")
>> > >> >>> >>> >>> >>                 .convertBodyTo(Document.class)
>> > >> >>> >>> >>> >>                 .recipientList().xquery(
>> > >> >>> >>> >>> >>                     "concat('ftp://'" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/server/@value" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> +
>> > >> >>> >>> >>> >>                     ",'?noop=true&amp;username='" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
>> > >> >>> >>> >>> >>                     ",'&amp;password='" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> ",//remote[vendorId/@value='CBOE34']/password/@value)",
>> > >> >>> >>> >>> >> String.class);
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> Here's the problem - this will create an FTP Producer
>> -
>> > >> that's
>> > >> >>> >>> >>> >> not
>> > >> >>> >>> >>> >> what I need.  I need a dynamically
>> > >> >>> >>> >>> >> constructed URI for a polling FTP consumer.  I don't
>> > think
>> > >> >>> >>> >>> >> "recipientList" will work...   Any ideas?
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> Thanks,
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> Chris
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden
>> > >> >>> >>> >>> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>> >> > Hi Claus,
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > I hate to ask this - but I still don't get it.  I
>> > thought
>> > >> >>> >>> >>> >> > "recipientList" was for sending to multiple,
>> > >> runtime-defined
>> > >> >>> >>> >>> >> > recipients.  I don't see how this
>> > >> >>> >>> >>> >> > answers the question of sending to one, single
>> > recipient,
>> > >> >>> >>> >>> >> > whose
>> > >> >>> >>> >>> >> > URI
>> > >> >>> >>> >>> is
>> > >> >>> >>> >>> >> > dynamically constructed - and in my use-case the
>> > dynamic
>> > >> >>> >>> >>> >> > settings
>> > >> >>> >>> >>> >> > are not in properties - so "simple" (property
>> > >> place-holders)
>> > >> >>> >>> >>> >> > won't
>> > >> >>> >>> >>> help
>> > >> >>> >>> >>> >> me.
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > Let me give you a concrete example.  I need to do
>> an
>> > ftp
>> > >> >>> >>> >>> >> > download
>> > >> >>> >>> >>> and
>> > >> >>> >>> >>> >> > the connection information comes from up-stream in
>> the
>> > >> route
>> > >> >>> >>> >>> >> > in
>> > >> >>> >>> >>> >> > the
>> > >> >>> >>> >>> >> > form of XML (DOM - a Document instance).
>>  Currently, I
>> > am
>> > >> >>> >>> >>> >> > trying
>> > >> >>> >>> >>> >> > to
>> > >> >>> >>> >>> do
>> > >> >>> >>> >>> >> > this with bean binding and method params decorated
>> with
>> > >> >>> >>> >>> >> > @XPath
>> > >> >>> >>> >>> >> > pointing into the Document with the ftp settings
>> and
>> > >> inside
>> > >> >>> >>> >>> >> > the
>> > >> >>> >>> >>> >> > this method doing:
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > FtpComponent ftpComponent =
>> context.getComponent("ftp",
>> > >> >>> >>> >>> >> FtpComponent.class);
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > ..and then attempt to get the endpoint and call
>> > >> >>> >>> >>> >> > createConsumer(...).
>> > >> >>> >>> >>> >> > I'm sure this is not the right way to do it, but I
>> > don't
>> > >> see
>> > >> >>> >>> >>> >> > how
>> > >> >>> >>> >>> else
>> > >> >>> >>> >>> >> > - any ideas?
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > Thanks,
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > Chris
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen
>> <[hidden
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> wrote:
>> > >> >>> >>> >>> >> >> Hi
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> See this FAQ
>> > >> >>> >>> >>> >> >>
>> > >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=4>
>> > >> >>> >>> >>> >> >> <[hidden
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>> Thanks Walzer..
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>> *Queston1:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>> *Example*
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> .when(header("foo").isEqualTo("bar"))
>> > >> >>> >>> >>> >> >>>                     .to("direct:b")
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> In my case i have to add more than 80 condition
>> and
>> > >> >>> >>> >>> >> >>> forwards
>> > >> >>> >>> >>> >> >>> to 80
>> > >> >>> >>> >>> >> >>> different queues.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Above example i can only hard-code queue name,But
>> > what
>> > >> i
>> > >> >>> >>> >>> >> >>> want
>> > >> >>> >>> >>> >> >>> is
>> > >> >>> >>> >>> below.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> * .when(header("Type").isNotNull())
>> > >> >>> >>> >>> >> >>>     .to("activemq.Inbound."+header("Type"))
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Example:If queue type is test,It should forward
>> to
>> > >> >>> >>> >>> >> >>> *Inbound.test*
>> > >> >>> >>> >>> >> queue.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Above example i tried,but it did not
>> worked,created
>> > >> queue
>> > >> >>> >>> >>> something
>> > >> >>> >>> >>> >> >>> like this *Inbound.header("type")*
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> *Question2*:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> from("direct:a")
>> > >> >>> >>> >>> >> >>>             .multicast().to("direct:b",
>> "direct:c",
>> > >> >>> >>> >>> >> >>> "direct:d");
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Based on messages header and content type i want
>> > >> forward
>> > >> >>> >>> >>> >> >>> to
>> > >> >>> >>> >>> different
>> > >> >>> >>> >>> >> >>> queue.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> condition will be *OR *and *AND*.How can i do
>> that
>> > like
>> > >> >>> >>> >>> >> >>> above
>> > >> >>> >>> >>> example.*
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Thanks in advance*
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> *Regards*
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Prabu.N
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas
>> [via
>> > >> >>> >>> >>> >> >>> Camel] <
>> > >> >>> >>> >>> >> >>> [hidden
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> > Hi,
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > you could start by reading Claus´ book (p.
>> 44ff)
>> > >> which
>> > >> >>> >>> >>> >> >>> > has a
>> > >> >>> >>> >>> perfect
>> > >> >>> >>> >>> >> >>> > example or
>> > >> >>> >>> >>> >> >>> >
>> http://camel.apache.org/content-based-router.html
>> > >> >>> >>> >>> >> >>> > (just
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> >>> > replace the direct: with your queues).
>> > >> >>> >>> >>> >> >>> > If you need to fire your messages to multiple
>> > queues:
>> > >> >>> >>> >>> >> >>> >
>> > >> http://camel.apache.org/publish-subscribe-channel.html
>> > >> >>> >>> >>> >> >>> > shows
>> > >> >>> >>> >>> you the
>> > >> >>> >>> >>> >> >>> > various ways.
>> > >> >>> >>> >>> >> >>> > When you get the concepts you can just "lego"
>> them
>> > >> >>> >>> >>> >> >>> > together.
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > Regards, Thomas.
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>> > >> >>> >>> >>> >> >>>
>> http://user/SendEmail.jtp?type=node&node=5730116&i=0
>> > >"
>> > >> >>> >>> >>> >> >>> > <[hidden email] <
>> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>>
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > > Hi Claus,
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > Thanks so much Clus for help.It is working
>> now.
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > I need your guidance for the following
>> > requirement.
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > 1.I have one *inbound queue* it will receive
>> > >> message
>> > >> >>> >>> >>> frequently
>> > >> >>> >>> >>> >> from my
>> > >> >>> >>> >>> >> >>> > > application.
>> > >> >>> >>> >>> >> >>> > > 2.From *inbound queue* i need camel routing
>> to
>> > move
>> > >> >>> >>> >>> >> >>> > > message
>> > >> >>> >>> >>> from
>> > >> >>> >>> >>> >> >>> > > another *message
>> > >> >>> >>> >>> >> >>> > > based inbound queue* based on message header
>> > value.
>> > >> >>> >>> >>> >> >>> > > 3.From *message based inbound queue *i* *need
>> > camel
>> > >> >>> >>> >>> >> >>> > > routing to
>> > >> >>> >>> >>> move
>> > >> >>> >>> >>> >> >>> > message
>> > >> >>> >>> >>> >> >>> > > to *one or more outbound queue *based on
>> message
>> > >> >>> >>> >>> >> >>> > > content*
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > I need *camel java DSL*sample code for above
>> > >> >>> >>> >>> >> >>> > > requirement.*
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > > *Thanks in advance*
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus
>> Ibsen-2
>> > [via
>> > >> >>> >>> >>> >> >>> > > Camel]
>> > >> >>> >>> >>> >> >>> > > <
>> > >> >>> >>> >>> >> >>> > > [hidden email] <
>> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>>
>> > >> >>> >>> >>> >> >>> > wrote:
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >> Hi
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> Do as the exception tells you. Check route
>> 2.
>> > You
>> > >> >>> >>> >>> >> >>> > >> route
>> > >> >>> >>> >>> >> >>> > >> from
>> > >> >>> >>> >>> >> >>> > >> "Inbound.SSS.TestEvent". And that is now
>> know to
>> > >> >>> >>> >>> >> >>> > >> Camel.
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> Maybe you need to add "activemq:" as prefix
>> so
>> > its
>> > >> >>> >>> >>> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden
>> email]<
>> > >> >>> >>> >>> >> >>> >
>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0
>> > >> >
>> > >> >>> >>> >>> >> >>> > >> <[hidden email] <
>> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
>> > >> >>> >>> >>> >> >>> >>
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > >> wrote:
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I have activemmq  Project in that i have
>> > >> following
>> > >> >>> >>> >>> requirement
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> 1.Move message from Inbound queue to type
>> based
>> > >> >>> >>> >>> >> >>> > >>> inbound
>> > >> >>> >>> >>> queue.
>> > >> >>> >>> >>> >> >>> > >>> 2.Move message from Message type inbound
>> queue
>> > to
>> > >> >>> >>> >>> >> >>> > >>> outbound
>> > >> >>> >>> >>> queue
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I have created two bean for to achieve
>> this.
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> 1.one for move from inbound to message type
>> > >>  inbound
>> > >> >>> >>> >>> >> >>> > >>> queue
>> > >> >>> >>> >>> >> >>> > >>> 2.one for move from inbound to outbound
>> queue.
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I have following entry in camel.xml
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>   <camelContext id="camel" xmlns="
>> > >> >>> >>> >>> >> >>> > http://camel.apache.org/schema/spring">
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>                <routeBuilder
>> ref="routeBuilder"
>> > >> />
>> > >> >>> >>> >>> >> >>> > >>>            <routeBuilder
>> ref="routeBuilder1" />
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>    </camelContext>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder"
>> > >> >>> >>> >>> >> >>> > >>>
>> > class="com.camel.routes.SinglecastRouteBuilder"/>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator"
>> > >> >>> >>> >>> >> >>> > >>>
>> class="com.camel.routes.TypeSpecificListBean"/>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder1"
>> > >> >>> >>> >>> >> >>> > >>>
>> > class="com.camel.routes.MulticastRouteBuilder"/>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator1"
>> > >> >>> >>> >>> >> >>> > >>>
>> class="com.camel.routes.RecipientListBean"/>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> When i run application i am getting
>> following
>> > >> error.
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> * java.lang.Exception:
>> > >> >>> >>> >>> org.apache.camel.RuntimeCamelException:
>> > >> >>> >>> >>> >> >>> > >>> org.apache.camel.Fa
>> > >> >>> >>> >>> >> >>> > >>> iledToCreateRouteException: Failed to
>> create
>> > >> route
>> > >> >>> >>> >>> >> >>> > >>> route2:
>> > >> >>> >>> >>> >> >>> > >>> Route[[From[Inbound.G
>> > >> >>> >>> >>> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:...
>> > >> because
>> > >> >>> >>> >>> >> >>> > >>> of No
>> > >> >>> >>> >>> endpoint
>> > >> >>> >>> >>> >> >>> > could
>> > >> >>> >>> >>> >> >>> > >> be
>> > >> >>> >>> >>> >> >>> > >>> found
>> > >> >>> >>> >>> >> >>> > >>> for: Inbound.SSS.TestEvent, please check
>> your
>> > >> >>> >>> >>> >> >>> > >>> classpath
>> > >> >>> >>> >>> contains
>> > >> >>> >>> >>> >> the
>> > >> >>> >>> >>> >> >>> > >> needed
>> > >> >>> >>> >>> >> >>> > >>> Cam
>> > >> >>> >>> >>> >> >>> > >>> el component jar.*
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I am not sure i am missing any
>> > >> configuration,Please
>> > >> >>> >>> >>> >> >>> > >>> kindly
>> > >> >>> >>> >>> help
>> > >> >>> >>> >>> >> me
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> --
>> > >> >>> >>> >>> >> >>> > >>> View this message in context:
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>> > >> >>> >>> >>> >> >>> > >>> Sent from the Camel - Users mailing list
>> > archive
>> > >> at
>> > >> >>> >>> >>> Nabble.com.
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> --
>> > >> >>> >>> >>> >> >>> > >> Claus Ibsen
>> > >> >>> >>> >>> >> >>> > >> -----------------
>> > >> >>> >>> >>> >> >>> > >> Red Hat, Inc.
>> > >> >>> >>> >>> >> >>> > >> FuseSource is now part of Red Hat
>> > >> >>> >>> >>> >> >>> > >> Email: [hidden email]<
>> > >> >>> >>> >>> >> >>> >
>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2
>> > >> >
>> > >> >>> >>> >>> >> >>> > >> Web: http://fusesource.com
>> > >> >>> >>> >>> >> >>> > >> Twitter: davsclaus
>> > >> >>> >>> >>> >> >>> > >> Blog: http://davsclaus.com
>> > >> >>> >>> >>> >> >>> > >> Author of Camel in Action:
>> > >> >>> >>> >>> >> >>> > >> http://www.manning.com/ibsen
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> ------------------------------
>> > >> >>> >>> >>> >> >>> > >> If you reply to this email, your message
>> will be
>> > >> >>> >>> >>> >> >>> > >> added to
>> > >> >>> >>> >>> >> >>> > >> the
>> > >> >>> >>> >>> >> >>> > discussion
>> > >> >>> >>> >>> >> >>> > >> below:
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > >> .
>> > >> >>> >>> >>> >> >>> > >> 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
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > --
>> > >> >>> >>> >>> >> >>> > > Thanks & Regards
>> > >> >>> >>> >>> >> >>> > > Prabu.N
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > --
>> > >> >>> >>> >>> >> >>> > > View this message in context:
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > > Sent from the Camel - Users mailing list
>> archive
>> > at
>> > >> >>> >>> >>> Nabble.com.
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > ------------------------------
>> > >> >>> >>> >>> >> >>> >  If you reply to this email, your message will
>> be
>> > >> added
>> > >> >>> >>> >>> >> >>> > to
>> > >> >>> >>> >>> >> >>> > the
>> > >> >>> >>> >>> >> discussion
>> > >> >>> >>> >>> >> >>> > below:
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>> > >> >>> >>> >>> >> >>> >  To unsubscribe from Camel routing issue, 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
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> --
>> > >> >>> >>> >>> >> >>> Thanks & Regards
>> > >> >>> >>> >>> >> >>>  Prabu.N
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> --
>> > >> >>> >>> >>> >> >>> View this message in context:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>> > >> >>> >>> >>> >> >>> Sent from the Camel - Users mailing list archive
>> at
>> > >> >>> >>> >>> >> >>> Nabble.com.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> --
>> > >> >>> >>> >>> >> >> Claus Ibsen
>> > >> >>> >>> >>> >> >> -----------------
>> > >> >>> >>> >>> >> >> Red Hat, Inc.
>> > >> >>> >>> >>> >> >> FuseSource is now part of Red Hat
>> > >> >>> >>> >>> >> >> Email: [hidden
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=7>
>> > >> >>> >>> >>> >> >> Web: http://fusesource.com
>> > >> >>> >>> >>> >> >> Twitter: davsclaus
>> > >> >>> >>> >>> >> >> Blog: http://davsclaus.com
>> > >> >>> >>> >>> >> >> Author of Camel in Action:
>> > http://www.manning.com/ibsen
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > --
>> > >> >>> >>> >>> > Claus Ibsen
>> > >> >>> >>> >>> > -----------------
>> > >> >>> >>> >>> > Red Hat, Inc.
>> > >> >>> >>> >>> > FuseSource is now part of Red Hat
>> > >> >>> >>> >>> > Email: [hidden
>> > >> >>> >>> >>> > email]<
>> > http://user/SendEmail.jtp?type=node&node=5730166&i=8
>> > >> >
>> > >> >>> >>> >>> > Web: http://fusesource.com
>> > >> >>> >>> >>> > Twitter: davsclaus
>> > >> >>> >>> >>> > Blog: http://davsclaus.com
>> > >> >>> >>> >>> > Author of Camel in Action:
>> http://www.manning.com/ibsen
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> ------------------------------
>> > >> >>> >>> >>>  If you reply to this email, your message will be added
>> to
>> > the
>> > >> >>> >>> >>> discussion below:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
>> > >> >>> >>> >>>  To unsubscribe from Camel routing issue, 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
>> > >> >
>> > >> >>> >>> >>>
>> > >> >>> >>> >>
>> > >> >>> >>> >>
>> > >> >>> >>> >>
>> > >> >>> >>> >> --
>> > >> >>> >>> >> Thanks & Regards
>> > >> >>> >>> >>  Prabu.N
>> > >> >>> >>> >>
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> > --
>> > >> >>> >>> > Thanks & Regards
>> > >> >>> >>> >  Prabu.N
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> > --
>> > >> >>> >>> > View this message in context:
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
>> > >> >>> >>> > Sent from the Camel - Users mailing list archive at
>> > Nabble.com.
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >> --
>> > >> >>> >> Thanks & Regards
>> > >> >>> >>  Prabu.N
>> > >> >>> >
>> > >> >>> >
>> > >> >>> >
>> > >> >>> >
>> > >> >>> > --
>> > >> >>> > Thanks & Regards
>> > >> >>> >  Prabu.N
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >> --
>> > >> >> Thanks & Regards
>> > >> >>  Prabu.N
>> > >>
>> > >
>> > >
>> > >
>> > > --
>> > > Thanks & Regards
>> > >  Prabu.N
>> > >
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> >  Prabu.N
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730590.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730662.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730916.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi All,

I am facing some issue in my camel code.

Initially i have used java code to route messages from one end to another
end.

I modified code to route message using camel routing insight of java code.

After modified code,i am facing issue in my code.

500 Messages stored in DLQ.testQueue

When i try to re-delivery all 500 messages using active-mq API *moveMessageTo
method.*

250 or 200 or 100 messages still i can see in DLQ.testQueue.

I feel messages re-delivering,But due to some message coming back again
into DLQ.

Please kindly help me.

*Regards*
Prabu.N


On Wed, Apr 17, 2013 at 5:15 PM, Taariq Levack [via Camel] <
ml-node+s465427n5731018h60@n5.nabble.com> wrote:

> Hi
>
> Looks like java needs a hand[1], after .to(SCHEDULE_QNAME,ONLINE__QNAME),
> you can try endChoice()
>
> [1]
>
> http://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
>
> Taariq
>
>
> On Wed, Apr 17, 2013 at 11:00 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5731018&i=0><[hidden
> email] <http://user/SendEmail.jtp?type=node&node=5731018&i=1>
> > wrote:
>
> > Thanks Claus for your response..
> >
> > I facing some issue in below code
> >
> > if condition satisfy i want forward into 2 queues,If not it check second
> > condition forward into next queue.
> >
> >     from(SURVEYINVITATION_QNAME).choice()
> > *          .when(SCHEDULE_PREDICATE)*
> >                .multicast().to(SCHEDULE_QNAME,ONLINE__QNAME)
> > *           .when(ACCOUNT_EVENT_CARE_HANDLER_PREDICATE)*
> >                .to(ACCOUNT_EVENT_CARE_HANDLER_QNAME)
> >           .otherwise()
> >               .to(ERQ_QNAME)
> >          .end();
> >
> >
> > I am getting compilation error,Please correct me what mistake i am
> making
> > here
> >
> > *Regards*
> > Prabu.N
> >
> >
> >
> >
> >
> >
> > On Wed, Apr 17, 2013 at 2:21 PM, Claus Ibsen-2 [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5731018&i=2>>
> wrote:
> >
> > > Hi
> > >
> > > If no destinations is returned, then the message is not routed
> anywhere.
> > >
> > > On Tue, Apr 16, 2013 at 3:44 PM, [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5731013&i=0>
> > > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5731013&i=1>>
>
> > > wrote:
> > >
> > > > *One quick question.*
> > > >
> > > >
> > >
> >
> from("activemq:queue:HHH.InboundQueue").multicast().beanRef("recipientsGenerator")
>
> > >
> > > >
> > > > @RecipientList()
> > > >  public Set<String> routeTo(Exchange ex) {
> > > >
> > > >  final Set<String> destinations = new HashSet<String>();
> > > >
> > > >  //based on condition we add messages header/content ,We add queue
> > names
> > > in
> > > > destinations varible.
> > > >  //destinations.add("activemq:queue:listqueue")
> > > >
> > > >   return destinations;
> > > >  }
> > > >
> > > > some cases,messages content not satisfy any condition and it
> returning
> > > > empty destinations set.
> > > >
> > > > If destinations set is empty where message will go?.
> > > >
> > > > Because,i can't see messages in HHH.InboundQueue and any queues.
> > > >
> > > > *Regards*
> > > > Prabu.N
> > > >
> > > >
> > > >
> > > >
> > > > On Mon, Apr 15, 2013 at 10:00 PM, Prabu <[hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5731013&i=2>>
> > > wrote:
> > > >
> > > >> So for dynamic queue i have to use only recipientlist correct,we
> can't
> > > use
> > > >> .to
> > > >>
> > > >> One more question,i can't use otherwise in choice please correct if
> my
> > > >> syntax is wrong.
> > > >>
> > > >>
> > > >> from(INBOUND_QUEUE)
> > > >> .choice().when(header(TYPE).isNotNull())
> > > >>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> > > >> .otherwise()
> > > >>    .to(ERQ_QNAME)
> > > >> .endChoice();
> > > >>
> > > >> After execute i am getting following error.
> > > >>
> > > >> Error:
> > > >>
> > > >> Router.java:22: cannot find symbol
> > > >> symbol  : method otherwise()
> > > >> location: class
> > > >> org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> > > >> model.ChoiceDefinition>
> > > >>            .otherwise()
> > > >>            ^
> > > >>
> > > >>
> > > >>
> > > >> On Mon, Apr 15, 2013 at 8:55 PM, Claus Ibsen-2 [via Camel] <
> > > >> [hidden email] <
> http://user/SendEmail.jtp?type=node&node=5731013&i=3
>
> > >>
> > > wrote:
> > > >>
> > > >>> Hi
> > > >>>
> > > >>> Yes recipient list uses an expression for evaluating where to send
> > the
> > > >>> message to.
> > > >>> See its doc
> > > >>> http://camel.apache.org/recipient-list.html
> > > >>>
> > > >>> And this FAQ
> > > >>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> > > >>>
> > > >>> And there is no performance overhead. eg when you send the message
> to
> > > >>> a previous destination, then that endpoints/producer is reused.
> > > >>>
> > > >>>
> > > >>> On Mon, Apr 15, 2013 at 2:05 PM, [hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730920&i=0>
> > > >>> <[hidden email] <
> > http://user/SendEmail.jtp?type=node&node=5730920&i=1>>
> > >
> > > >>> wrote:
> > > >>>
> > > >>> > Question:1
> > > >>> >
> > > >>> > I am having code like blow.based on condition i want forward
> into
> > > >>> dynamic
> > > >>> > queue.
> > > >>> >
> > > >>> >  .when(header(TYPE).isNotNull())
> > > >>> >
> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> > > >>> >
> > > >>> > i want to use .to(simple ) insight of .recipientList(simple)
> > > >>> >
> > > >>> > Please suggest is it possible?.why it is not possible is there
> any
> > > >>> > performance issue if i use .recipientList(simple)
> > > >>> >
> > > >>> > Questuon:2
> > > >>> >
> > > >>> > Error in code
> > > >>> >
> > > >>> > from(INBOUND_QUEUE)
> > > >>> > .choice().when(header(TYPE).isNotNull())
> > > >>> >
> .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
> > > >>> > .otherwise()
> > > >>> >    .to(ERQ_QNAME)
> > > >>> > .endChoice();
> > > >>> >
> > > >>> > After execute i am getting following error.
> > > >>> >
> > > >>> > Error:
> > > >>> >
> > > >>> > Router.java:22: cannot find symbol
> > > >>> > symbol  : method otherwise()
> > > >>> > location: class
> > > >>> > org.apache.camel.model.RecipientListDefinition<org.apache.camel.
> > > >>> > model.ChoiceDefinition>
> > > >>> >            .otherwise()
> > > >>> >            ^
> > > >>> >
> > > >>> > Question:3
> > > >>> >
> > > >>> > I having more than 85 queues.Based on condition i want to
> forward
> > to
> > > >>> correct
> > > >>> > queue.
> > > >>> >
> > > >>> > In my route builder i having code below for all 85 queus.
> > > >>> >
> > > >>> >   from(ALERT_QNAME).choice()
> > > >>> >           .when(ALERT_PREDICATE).to(ALERT_QNAME)
> > > >>> >           .otherwise()
> > > >>> >           .to(ERQ_QNAME)
> > > >>> >  .end();
> > > >>> >
> > > >>> > I feel like because of my code performance getting
> degrade.Please
> > > >>> suggest if
> > > >>> > i am wrong?
> > > >>> >
> > > >>> > When i open jconsole i am getting white screen and queues some
> time
> > > not
> > > >>> > showing any attribute?
> > > >>> >
> > > >>> > Please kindly help me.
> > > >>> >
> > > >>> >
> > > >>> >
> > > >>> > --
> > > >>> > View this message in context:
> > > >>>
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730898.html
> > > >>>
> > > >>> > Sent from the Camel - Users mailing list archive at Nabble.com.
> > > >>>
> > > >>>
> > > >>>
> > > >>> --
> > > >>> Claus Ibsen
> > > >>> -----------------
> > > >>> Red Hat, Inc.
> > > >>> FuseSource is now part of Red Hat
> > > >>> Email: [hidden email]<
> > > http://user/SendEmail.jtp?type=node&node=5730920&i=2>
> > > >>> Web: http://fusesource.com
> > > >>> Twitter: davsclaus
> > > >>> Blog: http://davsclaus.com
> > > >>> Author of Camel in Action: http://www.manning.com/ibsen
> > > >>>
> > > >>>
> > > >>> ------------------------------
> > > >>>  If you reply to this email, your message will be added to the
> > > >>> discussion below:
> > > >>>
> > > >>>
> > >
> > > >>> .
> > > >>> 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
> > >
> > >
> > > >>>
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> Thanks & Regards
> > > >>  Prabu.N
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > Thanks & Regards
> > > >  Prabu.N
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730973.html
> > >
> > > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > >
> > >
> > >
> > > --
> > > Claus Ibsen
> > > -----------------
> > > Red Hat, Inc.
> > > FuseSource is now part of Red Hat
> > > Email: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5731013&i=4>
> > > Web: http://fusesource.com
> > > Twitter: davsclaus
> > > Blog: http://davsclaus.com
> > > Author of Camel in Action: http://www.manning.com/ibsen
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731013.html
> > >  To unsubscribe from Camel routing issue, 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
> > >
> > >
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731014.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731018.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5731422.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi Chris/Claus,

*Question:1*

I am having code like blow.based on condition i want forward into dynamic
queue.

 .when(header(TYPE).isNotNull())
  .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))

i want to use .to(simple ) insight of .recipientList(simple)

Please suggest is it possible?.why it is not possible is there any
performance issue if i use .recipientList(simple)

*Question:2*

 I having more than 85 queues.Based on condition i want to forward to
correct queue.

In my route builder i having code below for all 85 queus.

  from(ALERT_QNAME).choice()
          .when(ALERT_PREDICATE).to(ALERT_QNAME)
          .otherwise()
          .to(ERQ_QNAME)
 .end();

I feel like because of my code performance getting degrade.Please suggest
if i am wrong?

When i open jconsole i am getting white screen and queues some time not
showing any attribute?


Please kindly help me.

*Regards*
Prabu.N


On Wed, Apr 10, 2013 at 7:39 PM, Chris Wolf [via Camel] <
ml-node+s465427n5730662h24@n5.nabble.com> wrote:

> You're asking about a problem with "CARD_EVENT_PREDICATE" without
> including
> the definition of that?
>
>
> On Tue, Apr 9, 2013 at 8:31 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730662&i=1>>wrote:
>
>
> > Hi Chris,
> >
> > from(CARD_TYPE_SPECIFIC_QNAME).choice()
> > .when(SCHEDULE_PREDICATE).multicast().to(CARD_QNAME,SCHEDULE_QNAME);
> > .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
> > .otherwise()
> > .setHeader(PROPERTY_ORIGINAL_DESTINATION,
> > constant(PROPERTY_ORIGINAL_DESTINATION_VALUE))
> > .to(ERQ_QNAME)
> > .end();
> >
> > When i compile above code i am getting followin
> >
> > lder.java:115: illegal start of expression
> >     .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
> >               ^
> >
> > Please kindly help me,i am doing any syntax mistake here
> >
> > *Regards*
> > Prabu.N
> >
> >
> >
> >
> >
> > On Fri, Apr 5, 2013 at 3:58 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=2>>
> wrote:
> >
> > > Thanks Chris/Claus it worked,
> > >
> > >
> > > Hi Chris/Claus,
> > >
> > > When running active-mq 5.8 i am getting following issue,do you have
> any
> > > idea.
> > >
> > > 2013-04-05 05:26:16,312 | WARN  | Async error occurred:
> > > java.lang.IllegalStateException: Cannot add a consumer to a connection
> > that
> > > had not been registered:
> > >
> > >
> > > *Regards*
> > > Prabu.N
> > >
> > >
> > >
> > >
> > > On Thu, Apr 4, 2013 at 6:55 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=3>>
> wrote:
> > >
> > >> 1.) You're NOT using my code - it's still the same as you had before
> > >> 2.) You're still calling setHeader(java.lang.String,
> java.lang.String)
> > >>      even though I tried to tell you that it has to be
> > >>      setHeader(java.lang.String, org.apache.camel.Expression)
> > >>
> > >> On Wed, Apr 3, 2013 at 2:51 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=4>>
> wrote:
> > >> > Please kindly help me...
> > >> >
> > >> > On Apr 3, 2013 8:54 PM, "Prabu" <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=5>>
> wrote:
> > >> >>
> > >> >> Hi Chris,
> > >> >>
> > >> >> I used your code.But i am getting following compilation error
> > >> >>
> > >> >> lder.java:92: cannot find symbol
> > >> >> symbol  : method setHeader(java.lang.String,java.lang.String)
> > >> >> location: class org.apache.camel.model.ChoiceDefinition
> > >> >>                   .otherwise().setHeader("MyHeader","sdfsdf")
> > >> >>
> > >> >>
> > >> >> Note: I am using camel 2.10 version
> > >> >>
> > >> >>
> > >> >>
> > >> >> On Wed, Apr 3, 2013 at 8:22 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=6>>
>
> > >> wrote:
> > >> >>>
> > >> >>> Hi Prabu,
> > >> >>>
> > >> >>> I don't mind helping, but could you continue to use the
> > >> >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=7>rather then my private email?  That way, if
> > >> >>> other people have similar issues, they can benefit.
> > >> >>>
> > >> >>>
> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> > >> >>>            .otherwise()
> > >> >>>            .setHeader("MyHeader", constant("some-value"))  //
> <===
> > Set
> > >> >>> Header
> > >> >>>            .to(ERQ_QNAME)
> > >> >>>    .end();
> > >> >>>
> > >> >>> This technique will use the "simple" language function "constant"
> to
> > >> >>> set a string constant value.
> > >> >>> If the value you need to set is dynamic, then you could use a
> > >> >>> property placeholder.
> > >> >>>
> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> > >> >>>            .otherwise()
> > >> >>>            .setHeader("MyHeader", constant("{{some-prop}}"))  //
> > <===
> > >> Set
> > >> >>> Header
> > >> >>>            .to(ERQ_QNAME)
> > >> >>>    .end();
> > >> >>>
> > >> >>> There are even more sophisticated ways to acquire dynamic values:
> > >> >>>
> > >> >>> http://camel.apache.org/python.html
> > >> >>>
> > >> >>> Regards,
> > >> >>>
> > >> >>> Chris
> > >> >>>
> > >> >>> On Wed, Apr 3, 2013 at 9:52 AM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=8>>
> wrote:
> > >> >>> > I have code like this,
> > >> >>> >
> > >> >>> >     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice()
> > >> >>> >           .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> > >> >>> >           .otherwise().to(ERQ_QNAME)
> > >> >>> >    .end();
> > >> >>> >
> > >> >>> >     from(DEACTIVATIN_TYPE_SPECIFIC_QNAME).choice()
> > >> >>> >
> > >> >>> > .when(ALERT_FAILURE_HANDLER_PREDICATE).to(ALERT_FAILURE_QNAME)
> > >> >>> >           .otherwise().to(ERQ_QNAME)
> > >> >>> >     .end();
> > >> >>> >
> > >> >>> > I want to set some values to header inside otherwise that is
> > before
> > >> >>> > message
> > >> >>> > move to ERQ_QNAME.
> > >> >>> >
> > >> >>> > please kindly help me how to do that.
> > >> >>> >
> > >> >>> > Regards
> > >> >>> > Prabu.N
> > >> >>> >
> > >> >>> >
> > >> >>> > On Tue, Apr 2, 2013 at 10:52 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=9>>
>
> > >> wrote:
> > >> >>> >>
> > >> >>> >> No,i didn't received ...
> > >> >>> >>
> > >> >>> >> Regards
> > >> >>> >> Prabu.N
> > >> >>> >>
> > >> >>> >>
> > >> >>> >> On Tue, Apr 2, 2013 at 7:31 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=10>
> > >
> > >> >>> >> wrote:
> > >> >>> >>>
> > >> >>> >>> Hi Prabu,
> > >> >>> >>>
> > >> >>> >>> Just out of curiosity - I am wondering if saw my email I sent
> > >> >>> >>> yesterday in response to your question?
> > >> >>> >>> I sent it to "[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=11>"
> with the subject,
> > >> >>> >>> "Content-based routing with Expressions and Predicates"...
> > >> >>> >>>
> > >> >>> >>> Regards,
> > >> >>> >>>
> > >> >>> >>> Chris
> > >> >>> >>>
> > >> >>> >>> On Tue, Apr 2, 2013 at 4:17 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=12>
> > >> >>> >>> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=13>>
> wrote:
> > >> >>> >>> > I have found solution in internet using Predicate  we can
> > >> achieve
> > >> >>> >>> > this,
> > >> >>> >>> >
> > >> >>> >>> > But,one doubt in the link
> > >> >>> >>> > http://camel.apache.org/predicate.html,Theymentioned that
> we
> > >> can
> > >> >>> >>> > use
> > >> >>> >>> > AND and OR in Predicate
> > >> >>> >>> >
> > >> >>> >>> > I have added below code in project,But i am getting
> > compilation
> > >> >>> >>> > error.Please kindly help
> > >> >>> >>> >
> > >> >>> >>> > *Predicate god = and(admin, or(body().contains("Camel
> Rider"),
> > >> >>> >>> > header("type").isEqualTo("god")));*
> > >> >>> >>> >
> > >> >>> >>> > *Thanks*
> > >> >>> >>> > Prabu.N
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=14>>
>
> > >> wrote:
> > >> >>> >>> >
> > >> >>> >>> >> Hi *Chris / **Claus*,
> > >> >>> >>> >>
> > >> >>> >>> >> I have one *Inbound* queue,based on header and content
> type,I
> > >> want
> > >> >>> >>> >> forward to outbound queue.
> > >> >>> >>> >> *
> > >> >>> >>> >> Example 1:
> > >> >>> >>> >> *
> > >> >>> >>> >> *
> > >> >>> >>> >> Inbound.queue name : **Inbound.Test.DDD
> > >> >>> >>> >> Outbound.queue name : SOURHQueueName
> > >> >>> >>> >>
> > >> >>> >>> >> *
> > >> >>> >>> >> *Criteria or Condition :
> > >> >>> >>> >> *
> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
> > >> >>> >>> >>    *AND*
> > >> >>> >>> >> Message *Type* value is : *card.test *or*
> card.expiry.test*
> > >> >>> >>> >>
> > >> >>> >>> >> *Example 2:*
> > >> >>> >>> >>
> > >> >>> >>> >> *Inbound.queue name : **Inbound.Test.SSS
> > >> >>> >>> >> Outbound.queue name : WESTQueueName
> > >> >>> >>> >> *
> > >> >>> >>> >> *Criteria or Condition :*
> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
> > >> >>> >>> >>  *AND
> > >> >>> >>> >> *
> > >> >>> >>> >> Message *Type *value *start with* :*card.event*
> > >> >>> >>> >>
> > >> >>> >>> >> I want achieve this using camel routing java DSL.
> > >> >>> >>> >>
> > >> >>> >>> >> Please help me.How can i use AND,OR and regular expression
> in
> > >> >>> >>> >> camel
> > >> >>> >>> >> routing
> > >> >>> >>> >>
> > >> >>> >>> >> *Regards*
> > >> >>> >>> >> Prabu.N
> > >> >>> >>> >>
> > >> >>> >>> >>
> > >> >>> >>> >> On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
> > >> >>> >>> >> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=15>>
> wrote:
> > >> >>> >>> >>
> > >> >>> >>> >>> Hi Claus,
> > >> >>> >>> >>>
> > >> >>> >>> >>> Thanks for the response - I could not see any obvious way
> to
> > >> >>> >>> >>> configure
> > >> >>> >>> >>> an FTP Consumer at ***runtime***,
> > >> >>> >>> >>> either via bean, processor or consumer template.  If you
> > have
> > >> a
> > >> >>> >>> >>> concrete example, that would be great to see...
> > >> >>> >>> >>>
> > >> >>> >>> >>> ...otherwise, here's the solution I came up with:
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>     -Chris
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>   // simulate incoming message from JMS...
> > >> >>> >>> >>>   from("timer:kickoff?repeatCount=1")
> > >> >>> >>> >>>   .to("direct:start");
> > >> >>> >>> >>>
> > >> >>> >>> >>>   // upon receipt of FTP config from JMS, invoke
> > >>  FtpConfigurer
> > >> >>> >>> >>> bean
> > >> >>> >>> >>> to reconfigure
> > >> >>> >>> >>>   // FTP route, then start it...
> > >> >>> >>> >>>   from("direct:start")
> > >> >>> >>> >>>   .beanRef("configRdr") // config reader bean not shown
> here
> > >> >>> >>> >>>   .convertBodyTo(Document.class)
> > >> >>> >>> >>>   // sets a bunch of headers from DOM, e.g.:
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>
> > >> >>> >>> >>>
> > >> >>> >>> >>> String.class)
> > >> >>> >>> >>>   .setHeader("ftp-route-id", constant("ftp.route"))
> > >> >>> >>> >>>   .beanRef("ftpConfigurer");
> > >> >>> >>> >>>
> > >> >>> >>> >>>   // FTP route will only be started by FtpConfigurer bean
> > >> after
> > >> >>> >>> >>> it's
> > >> >>> >>> >>> dynamically re-configured...
> > >> >>> >>> >>>   from("ftp://bogushost/bogusdir?startScheduler=false")
> //
> > >> the
> > >> >>> >>> >>> URI
> > >> >>> >>> >>> will be reconfigured...
> > >> >>> >>> >>>   .routeId("ftp.route").noAutoStartup()
> > >> >>> >>> >>>   .log("Received file ${file:onlyname}")
> > >> >>> >>> >>>   .to("file:/tmp/local/data");
> > >> >>> >>> >>>
> > >> >>> >>> >>>   public class FtpConfigurer {
> > >> >>> >>> >>>     public void configureFtpConsumer(Exchange exchange)
> > throws
> > >> >>> >>> >>> Exception
> > >> >>> >>> >>> {
> > >> >>> >>> >>>         CamelContext context = exchange.getContext();
> > >> >>> >>> >>>         Map<String, Object> headers =
> > >> >>> >>> >>> exchange.getIn().getHeaders();
> > >> >>> >>> >>>         Map<String, Object> parameters = new
> HashMap<String,
> > >> >>> >>> >>> Object>();
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // Filter headers for ftp-config specific
> headers...
> > >> >>> >>> >>>         for (Map.Entry<String, Object> entry :
> > >> >>> >>> >>> headers.entrySet()) {
> > >> >>> >>> >>>             String key = entry.getKey();
> > >> >>> >>> >>>             if (key.startsWith("ftp-config."))
> > >> >>> >>> >>>
> > >> >>> >>> >>> parameters.put(key.substring("ftp-config.".length()),
> > >> >>> >>> >>> entry.getValue());
> > >> >>> >>> >>>         }
> > >> >>> >>> >>>
> > >> >>> >>> >>>         String routeId =
> > >> >>> >>> >>> exchange.getIn().getHeader("ftp-route-id",
> > >> >>> >>> >>> String.class);
> > >> >>> >>> >>>         Route ftpRoute = context.getRoute(routeId);
> > >> >>> >>> >>>         FtpConsumer c = (FtpConsumer)
> > ftpRoute.getConsumer();
> > >> >>> >>> >>>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
> > >> >>> >>> >>> c.getEndpoint();
> > >> >>> >>> >>>         FtpConfiguration rfc = rfe.getConfiguration();
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // Need to crack open FtpConsumer's
> "endpointPath"
> > >> field
> > >> >>> >>> >>> since
> > >> >>> >>> >>>         // there's no mutator (setter)
> > >> >>> >>> >>>         Class<?> cls = c.getClass();
> > >> >>> >>> >>>         Field endpointPath_fld =
> > >> >>> >>> >>> cls.getDeclaredField("endpointPath");
> > >> >>> >>> >>>         endpointPath_fld.setAccessible(true);
> > >> >>> >>> >>>         endpointPath_fld.set(c,
> > >> >>> >>> >>> (String)parameters.get("directory"));
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // Need to crack open FtpEndpoint, actually
> > >> >>> >>> >>> DefaultEndpoint -
> > >> >>> >>> >>> the ultimate base class
> > >> >>> >>> >>>         // since there's no mutator (setter) for the
> > >> >>> >>> >>> "endpointUri"
> > >> >>> >>> >>> field
> > >> >>> >>> >>>         cls = rfe.getClass();
> > >> >>> >>> >>>         Field endpointUri_fld = null;
> > >> >>> >>> >>>         while (endpointUri_fld == null) {
> > >> >>> >>> >>>             // TODO: maybe change logic to just stop at
> > >> >>> >>> >>> class=DefaultEndpoint
> > >> >>> >>> >>>             // rather then using NoSuchFieldException
> > >> >>> >>> >>>             try {
> > >> >>> >>> >>>                 endpointUri_fld =
> > >> >>> >>> >>> cls.getDeclaredField("endpointUri");
> > >> >>> >>> >>>             } catch (NoSuchFieldException nsfe) {
> > >> >>> >>> >>>                 cls = cls.getSuperclass();
> > >> >>> >>> >>>             }
> > >> >>> >>> >>>         }
> > >> >>> >>> >>>         endpointUri_fld.setAccessible(true);
> > >> >>> >>> >>>         endpointUri_fld.set(rfe,
> > >> >>> >>> >>>             String.format("ftp://%s/%s",
> > >> >>> >>> >>> (String)parameters.get("host"),
> > >> >>> >>> >>> (String)parameters.get("directory")));
> > >> >>> >>> >>>
> > >> >>> >>> >>>         // set reference properties first as they use #
> > syntax
> > >> >>> >>> >>> that
> > >> >>> >>> >>> fools the regular properties setter
> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
> rfc,
> > >> >>> >>> >>> parameters);
> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfc,
> > >> parameters);
> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
> rfe,
> > >> >>> >>> >>> parameters);
> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfe,
> > >> parameters);
> > >> >>> >>> >>>         c.setStartScheduler(true);
> > >> >>> >>> >>>
> > >> >>> >>> >>>         context.startRoute(routeId);
> > >> >>> >>> >>>   }
> > >> >>> >>> >>> }
> > >> >>> >>> >>>
> > >> >>> >>> >>> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden
> > >> >>> >>> >>> email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=0
> > >>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>>
> > >> >>> >>> >>> > Hi
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > See this EIP
> > >> >>> >>> >>> > http://camel.apache.org/content-enricher.html
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > About pollEnrich.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > Though pollEnrich currently does support dynamic uris.
> Its
> > >> on
> > >> >>> >>> >>> > the
> > >> >>> >>> >>> roadmap,
> > >> >>> >>> >>> > for Camel 3.0.
> > >> >>> >>> >>> > It requires an API change and thus isn't so easy to
> > >> implement
> > >> >>> >>> >>> > currently
> > >> >>> >>> >>> on
> > >> >>> >>> >>> > 2.x.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > You can always use a java bean / camel processor, and
> > >> consume
> > >> >>> >>> >>> > the
> > >> >>> >>> >>> > ftp
> > >> >>> >>> >>> file
> > >> >>> >>> >>> > from java code.
> > >> >>> >>> >>> > For example using consumer template.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > As you use FTP you may want to set disconnect=true so
> the
> > >> >>> >>> >>> > connect
> > >> >>> >>> >>> > is
> > >> >>> >>> >>> not
> > >> >>> >>> >>> > remained open after usage.
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden
> > >> >>> >>> >>> > email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=1
> > >> >>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >> Ok, I'm starting to get it - a little bit.  As for my
> > >> concrete
> > >> >>> >>> >>> >> example, so far, I have:
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>                 from("direct:start")
> > >> >>> >>> >>> >>                 .beanRef("config")
> > >> >>> >>> >>> >>                 .convertBodyTo(Document.class)
> > >> >>> >>> >>> >>                 .recipientList().xquery(
> > >> >>> >>> >>> >>                     "concat('ftp://'" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/server/@value" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> +
> > >> >>> >>> >>> >>                     ",'?noop=true&amp;username='" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> > >> >>> >>> >>> >>                     ",'&amp;password='" +
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> ",//remote[vendorId/@value='CBOE34']/password/@value)",
> > >> >>> >>> >>> >> String.class);
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> Here's the problem - this will create an FTP Producer
> -
> > >> that's
> > >> >>> >>> >>> >> not
> > >> >>> >>> >>> >> what I need.  I need a dynamically
> > >> >>> >>> >>> >> constructed URI for a polling FTP consumer.  I don't
> > think
> > >> >>> >>> >>> >> "recipientList" will work...   Any ideas?
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> Thanks,
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> Chris
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden
> > >> >>> >>> >>> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>> >> > Hi Claus,
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > I hate to ask this - but I still don't get it.  I
> > thought
> > >> >>> >>> >>> >> > "recipientList" was for sending to multiple,
> > >> runtime-defined
> > >> >>> >>> >>> >> > recipients.  I don't see how this
> > >> >>> >>> >>> >> > answers the question of sending to one, single
> > recipient,
> > >> >>> >>> >>> >> > whose
> > >> >>> >>> >>> >> > URI
> > >> >>> >>> >>> is
> > >> >>> >>> >>> >> > dynamically constructed - and in my use-case the
> > dynamic
> > >> >>> >>> >>> >> > settings
> > >> >>> >>> >>> >> > are not in properties - so "simple" (property
> > >> place-holders)
> > >> >>> >>> >>> >> > won't
> > >> >>> >>> >>> help
> > >> >>> >>> >>> >> me.
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > Let me give you a concrete example.  I need to do an
> > ftp
> > >> >>> >>> >>> >> > download
> > >> >>> >>> >>> and
> > >> >>> >>> >>> >> > the connection information comes from up-stream in
> the
> > >> route
> > >> >>> >>> >>> >> > in
> > >> >>> >>> >>> >> > the
> > >> >>> >>> >>> >> > form of XML (DOM - a Document instance).  Currently,
> I
> > am
> > >> >>> >>> >>> >> > trying
> > >> >>> >>> >>> >> > to
> > >> >>> >>> >>> do
> > >> >>> >>> >>> >> > this with bean binding and method params decorated
> with
> > >> >>> >>> >>> >> > @XPath
> > >> >>> >>> >>> >> > pointing into the Document with the ftp settings and
> > >> inside
> > >> >>> >>> >>> >> > the
> > >> >>> >>> >>> >> > this method doing:
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > FtpComponent ftpComponent =
> context.getComponent("ftp",
> > >> >>> >>> >>> >> FtpComponent.class);
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > ..and then attempt to get the endpoint and call
> > >> >>> >>> >>> >> > createConsumer(...).
> > >> >>> >>> >>> >> > I'm sure this is not the right way to do it, but I
> > don't
> > >> see
> > >> >>> >>> >>> >> > how
> > >> >>> >>> >>> else
> > >> >>> >>> >>> >> > - any ideas?
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > Thanks,
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > Chris
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen
> <[hidden
> > >> >>> >>> >>> >> >
> > >> >>> >>> >>> >> > email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> wrote:
> > >> >>> >>> >>> >> >> Hi
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> See this FAQ
> > >> >>> >>> >>> >> >>
> > >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=4>
> > >> >>> >>> >>> >> >> <[hidden
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>> Thanks Walzer..
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>> *Queston1:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>> *Example*
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> .when(header("foo").isEqualTo("bar"))
> > >> >>> >>> >>> >> >>>                     .to("direct:b")
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> In my case i have to add more than 80 condition
> and
> > >> >>> >>> >>> >> >>> forwards
> > >> >>> >>> >>> >> >>> to 80
> > >> >>> >>> >>> >> >>> different queues.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Above example i can only hard-code queue name,But
> > what
> > >> i
> > >> >>> >>> >>> >> >>> want
> > >> >>> >>> >>> >> >>> is
> > >> >>> >>> >>> below.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> * .when(header("Type").isNotNull())
> > >> >>> >>> >>> >> >>>     .to("activemq.Inbound."+header("Type"))
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Example:If queue type is test,It should forward to
> > >> >>> >>> >>> >> >>> *Inbound.test*
> > >> >>> >>> >>> >> queue.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Above example i tried,but it did not
> worked,created
> > >> queue
> > >> >>> >>> >>> something
> > >> >>> >>> >>> >> >>> like this *Inbound.header("type")*
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> *Question2*:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> from("direct:a")
> > >> >>> >>> >>> >> >>>             .multicast().to("direct:b",
> "direct:c",
> > >> >>> >>> >>> >> >>> "direct:d");
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Based on messages header and content type i want
> > >> forward
> > >> >>> >>> >>> >> >>> to
> > >> >>> >>> >>> different
> > >> >>> >>> >>> >> >>> queue.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> condition will be *OR *and *AND*.How can i do that
> > like
> > >> >>> >>> >>> >> >>> above
> > >> >>> >>> >>> example.*
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Thanks in advance*
> > >> >>> >>> >>> >> >>> *
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> *Regards*
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> Prabu.N
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas
> [via
> > >> >>> >>> >>> >> >>> Camel] <
> > >> >>> >>> >>> >> >>> [hidden
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
> > >> >>> >>> >>> wrote:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> > Hi,
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > you could start by reading Claus´ book (p. 44ff)
> > >> which
> > >> >>> >>> >>> >> >>> > has a
> > >> >>> >>> >>> perfect
> > >> >>> >>> >>> >> >>> > example or
> > >> >>> >>> >>> >> >>> >
> http://camel.apache.org/content-based-router.html
> > >> >>> >>> >>> >> >>> > (just
> > >> >>> >>> >>>
> > >> >>> >>> >>> >> >>> > replace the direct: with your queues).
> > >> >>> >>> >>> >> >>> > If you need to fire your messages to multiple
> > queues:
> > >> >>> >>> >>> >> >>> >
> > >> http://camel.apache.org/publish-subscribe-channel.html
> > >> >>> >>> >>> >> >>> > shows
> > >> >>> >>> >>> you the
> > >> >>> >>> >>> >> >>> > various ways.
> > >> >>> >>> >>> >> >>> > When you get the concepts you can just "lego"
> them
> > >> >>> >>> >>> >> >>> > together.
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > Regards, Thomas.
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> > >> >>> >>> >>> >> >>>
> http://user/SendEmail.jtp?type=node&node=5730116&i=0
> > >"
> > >> >>> >>> >>> >> >>> > <[hidden email] <
> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > > Hi Claus,
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > Thanks so much Clus for help.It is working
> now.
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > I need your guidance for the following
> > requirement.
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > 1.I have one *inbound queue* it will receive
> > >> message
> > >> >>> >>> >>> frequently
> > >> >>> >>> >>> >> from my
> > >> >>> >>> >>> >> >>> > > application.
> > >> >>> >>> >>> >> >>> > > 2.From *inbound queue* i need camel routing to
> > move
> > >> >>> >>> >>> >> >>> > > message
> > >> >>> >>> >>> from
> > >> >>> >>> >>> >> >>> > > another *message
> > >> >>> >>> >>> >> >>> > > based inbound queue* based on message header
> > value.
> > >> >>> >>> >>> >> >>> > > 3.From *message based inbound queue *i* *need
> > camel
> > >> >>> >>> >>> >> >>> > > routing to
> > >> >>> >>> >>> move
> > >> >>> >>> >>> >> >>> > message
> > >> >>> >>> >>> >> >>> > > to *one or more outbound queue *based on
> message
> > >> >>> >>> >>> >> >>> > > content*
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > I need *camel java DSL*sample code for above
> > >> >>> >>> >>> >> >>> > > requirement.*
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > > *
> > >> >>> >>> >>> >> >>> > > *Thanks in advance*
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2
> > [via
> > >> >>> >>> >>> >> >>> > > Camel]
> > >> >>> >>> >>> >> >>> > > <
> > >> >>> >>> >>> >> >>> > > [hidden email] <
> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>
> > >> >>> >>> >>> >> >>> > wrote:
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >> Hi
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> Do as the exception tells you. Check route 2.
> > You
> > >> >>> >>> >>> >> >>> > >> route
> > >> >>> >>> >>> >> >>> > >> from
> > >> >>> >>> >>> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know
> to
> > >> >>> >>> >>> >> >>> > >> Camel.
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> Maybe you need to add "activemq:" as prefix
> so
> > its
> > >> >>> >>> >>> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden
> email]<
> > >> >>> >>> >>> >> >>> >
> > http://user/SendEmail.jtp?type=node&node=5730109&i=0
> > >> >
> > >> >>> >>> >>> >> >>> > >> <[hidden email] <
> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> > >> >>> >>> >>> >> >>> >>
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > >> wrote:
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I have activemmq  Project in that i have
> > >> following
> > >> >>> >>> >>> requirement
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> 1.Move message from Inbound queue to type
> based
> > >> >>> >>> >>> >> >>> > >>> inbound
> > >> >>> >>> >>> queue.
> > >> >>> >>> >>> >> >>> > >>> 2.Move message from Message type inbound
> queue
> > to
> > >> >>> >>> >>> >> >>> > >>> outbound
> > >> >>> >>> >>> queue
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I have created two bean for to achieve this.
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> 1.one for move from inbound to message type
> > >>  inbound
> > >> >>> >>> >>> >> >>> > >>> queue
> > >> >>> >>> >>> >> >>> > >>> 2.one for move from inbound to outbound
> queue.
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I have following entry in camel.xml
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>   <camelContext id="camel" xmlns="
> > >> >>> >>> >>> >> >>> > http://camel.apache.org/schema/spring">
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>                <routeBuilder
> ref="routeBuilder"
> > >> />
> > >> >>> >>> >>> >> >>> > >>>            <routeBuilder ref="routeBuilder1"
> />
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>    </camelContext>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder"
> > >> >>> >>> >>> >> >>> > >>>
> > class="com.camel.routes.SinglecastRouteBuilder"/>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator"
> > >> >>> >>> >>> >> >>> > >>>
> class="com.camel.routes.TypeSpecificListBean"/>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder1"
> > >> >>> >>> >>> >> >>> > >>>
> > class="com.camel.routes.MulticastRouteBuilder"/>
> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator1"
> > >> >>> >>> >>> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> When i run application i am getting
> following
> > >> error.
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> * java.lang.Exception:
> > >> >>> >>> >>> org.apache.camel.RuntimeCamelException:
> > >> >>> >>> >>> >> >>> > >>> org.apache.camel.Fa
> > >> >>> >>> >>> >> >>> > >>> iledToCreateRouteException: Failed to create
> > >> route
> > >> >>> >>> >>> >> >>> > >>> route2:
> > >> >>> >>> >>> >> >>> > >>> Route[[From[Inbound.G
> > >> >>> >>> >>> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:...
> > >> because
> > >> >>> >>> >>> >> >>> > >>> of No
> > >> >>> >>> >>> endpoint
> > >> >>> >>> >>> >> >>> > could
> > >> >>> >>> >>> >> >>> > >> be
> > >> >>> >>> >>> >> >>> > >>> found
> > >> >>> >>> >>> >> >>> > >>> for: Inbound.SSS.TestEvent, please check
> your
> > >> >>> >>> >>> >> >>> > >>> classpath
> > >> >>> >>> >>> contains
> > >> >>> >>> >>> >> the
> > >> >>> >>> >>> >> >>> > >> needed
> > >> >>> >>> >>> >> >>> > >>> Cam
> > >> >>> >>> >>> >> >>> > >>> el component jar.*
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> I am not sure i am missing any
> > >> configuration,Please
> > >> >>> >>> >>> >> >>> > >>> kindly
> > >> >>> >>> >>> help
> > >> >>> >>> >>> >> me
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>>
> > >> >>> >>> >>> >> >>> > >>> --
> > >> >>> >>> >>> >> >>> > >>> View this message in context:
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >>
> > >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> > >> >>> >>> >>> >> >>> > >>> Sent from the Camel - Users mailing list
> > archive
> > >> at
> > >> >>> >>> >>> Nabble.com.
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> --
> > >> >>> >>> >>> >> >>> > >> Claus Ibsen
> > >> >>> >>> >>> >> >>> > >> -----------------
> > >> >>> >>> >>> >> >>> > >> Red Hat, Inc.
> > >> >>> >>> >>> >> >>> > >> FuseSource is now part of Red Hat
> > >> >>> >>> >>> >> >>> > >> Email: [hidden email]<
> > >> >>> >>> >>> >> >>> >
> > http://user/SendEmail.jtp?type=node&node=5730109&i=2
> > >> >
> > >> >>> >>> >>> >> >>> > >> Web: http://fusesource.com
> > >> >>> >>> >>> >> >>> > >> Twitter: davsclaus
> > >> >>> >>> >>> >> >>> > >> Blog: http://davsclaus.com
> > >> >>> >>> >>> >> >>> > >> Author of Camel in Action:
> > >> >>> >>> >>> >> >>> > >> http://www.manning.com/ibsen
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >> ------------------------------
> > >> >>> >>> >>> >> >>> > >> If you reply to this email, your message will
> be
> > >> >>> >>> >>> >> >>> > >> added to
> > >> >>> >>> >>> >> >>> > >> the
> > >> >>> >>> >>> >> >>> > discussion
> > >> >>> >>> >>> >> >>> > >> below:
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > >> .
> > >> >>> >>> >>> >> >>> > >> 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
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > >>
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > --
> > >> >>> >>> >>> >> >>> > > Thanks & Regards
> > >> >>> >>> >>> >> >>> > > Prabu.N
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > >
> > >> >>> >>> >>> >> >>> > > --
> > >> >>> >>> >>> >> >>> > > View this message in context:
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > > Sent from the Camel - Users mailing list
> archive
> > at
> > >> >>> >>> >>> Nabble.com.
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> > ------------------------------
> > >> >>> >>> >>> >> >>> >  If you reply to this email, your message will
> be
> > >> added
> > >> >>> >>> >>> >> >>> > to
> > >> >>> >>> >>> >> >>> > the
> > >> >>> >>> >>> >> discussion
> > >> >>> >>> >>> >> >>> > below:
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> > >> >>> >>> >>> >> >>> >  To unsubscribe from Camel routing issue, 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
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>> >
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> --
> > >> >>> >>> >>> >> >>> Thanks & Regards
> > >> >>> >>> >>> >> >>>  Prabu.N
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>> --
> > >> >>> >>> >>> >> >>> View this message in context:
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> > >> >>> >>> >>> >> >>> Sent from the Camel - Users mailing list archive
> at
> > >> >>> >>> >>> >> >>> Nabble.com.
> > >> >>> >>> >>> >> >>>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> --
> > >> >>> >>> >>> >> >> Claus Ibsen
> > >> >>> >>> >>> >> >> -----------------
> > >> >>> >>> >>> >> >> Red Hat, Inc.
> > >> >>> >>> >>> >> >> FuseSource is now part of Red Hat
> > >> >>> >>> >>> >> >> Email: [hidden
> > >> >>> >>> >>> >> >>
> > >> >>> >>> >>> >> >> email]<
> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=7>
> > >> >>> >>> >>> >> >> Web: http://fusesource.com
> > >> >>> >>> >>> >> >> Twitter: davsclaus
> > >> >>> >>> >>> >> >> Blog: http://davsclaus.com
> > >> >>> >>> >>> >> >> Author of Camel in Action:
> > http://www.manning.com/ibsen
> > >> >>> >>> >>> >>
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> >
> > >> >>> >>> >>> > --
> > >> >>> >>> >>> > Claus Ibsen
> > >> >>> >>> >>> > -----------------
> > >> >>> >>> >>> > Red Hat, Inc.
> > >> >>> >>> >>> > FuseSource is now part of Red Hat
> > >> >>> >>> >>> > Email: [hidden
> > >> >>> >>> >>> > email]<
> > http://user/SendEmail.jtp?type=node&node=5730166&i=8
> > >> >
> > >> >>> >>> >>> > Web: http://fusesource.com
> > >> >>> >>> >>> > Twitter: davsclaus
> > >> >>> >>> >>> > Blog: http://davsclaus.com
> > >> >>> >>> >>> > Author of Camel in Action: http://www.manning.com/ibsen
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>> ------------------------------
> > >> >>> >>> >>>  If you reply to this email, your message will be added
> to
> > the
> > >> >>> >>> >>> discussion below:
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >> >>> >>> >>>
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
> > >> >>> >>> >>>  To unsubscribe from Camel routing issue, 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
> > >> >
> > >> >>> >>> >>>
> > >> >>> >>> >>
> > >> >>> >>> >>
> > >> >>> >>> >>
> > >> >>> >>> >> --
> > >> >>> >>> >> Thanks & Regards
> > >> >>> >>> >>  Prabu.N
> > >> >>> >>> >>
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> > --
> > >> >>> >>> > Thanks & Regards
> > >> >>> >>> >  Prabu.N
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> >
> > >> >>> >>> > --
> > >> >>> >>> > View this message in context:
> > >> >>> >>> >
> > >> >>> >>> >
> > >>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
> > >> >>> >>> > Sent from the Camel - Users mailing list archive at
> > Nabble.com.
> > >> >>> >>
> > >> >>> >>
> > >> >>> >>
> > >> >>> >>
> > >> >>> >> --
> > >> >>> >> Thanks & Regards
> > >> >>> >>  Prabu.N
> > >> >>> >
> > >> >>> >
> > >> >>> >
> > >> >>> >
> > >> >>> > --
> > >> >>> > Thanks & Regards
> > >> >>> >  Prabu.N
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> Thanks & Regards
> > >> >>  Prabu.N
> > >>
> > >
> > >
> > >
> > > --
> > > Thanks & Regards
> > >  Prabu.N
> > >
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730590.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730662.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730877.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Please kindly help me..

Regards
Prabu.N


On Mon, Apr 15, 2013 at 1:36 PM, Prabu <pr...@gmail.com> wrote:

> Hi Chris/Claus,
>
> *Question:1*
>
> I am having code like blow.based on condition i want forward into dynamic
> queue.
>
>  .when(header(TYPE).isNotNull())
>   .recipientList(simple("activemq:queue:Inbound.${header.TYPE}"))
>
> i want to use .to(simple ) insight of .recipientList(simple)
>
> Please suggest is it possible?.why it is not possible is there any
> performance issue if i use .recipientList(simple)
>
> *Question:2*
>
>  I having more than 85 queues.Based on condition i want to forward to
> correct queue.
>
> In my route builder i having code below for all 85 queus.
>
>   from(ALERT_QNAME).choice()
>           .when(ALERT_PREDICATE).to(ALERT_QNAME)
>           .otherwise()
>           .to(ERQ_QNAME)
>  .end();
>
> I feel like because of my code performance getting degrade.Please suggest
> if i am wrong?
>
> When i open jconsole i am getting white screen and queues some time not
> showing any attribute?
>
>
> Please kindly help me.
>
> *Regards*
> Prabu.N
>
>
> On Wed, Apr 10, 2013 at 7:39 PM, Chris Wolf [via Camel] <
> ml-node+s465427n5730662h24@n5.nabble.com> wrote:
>
>> You're asking about a problem with "CARD_EVENT_PREDICATE" without
>> including
>> the definition of that?
>>
>>
>> On Tue, Apr 9, 2013 at 8:31 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=0>
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730662&i=1>>wrote:
>>
>>
>> > Hi Chris,
>> >
>> > from(CARD_TYPE_SPECIFIC_QNAME).choice()
>> > .when(SCHEDULE_PREDICATE).multicast().to(CARD_QNAME,SCHEDULE_QNAME);
>> > .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
>> > .otherwise()
>> > .setHeader(PROPERTY_ORIGINAL_DESTINATION,
>> > constant(PROPERTY_ORIGINAL_DESTINATION_VALUE))
>> > .to(ERQ_QNAME)
>> > .end();
>> >
>> > When i compile above code i am getting followin
>> >
>> > lder.java:115: illegal start of expression
>> >     .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
>> >               ^
>> >
>> > Please kindly help me,i am doing any syntax mistake here
>> >
>> > *Regards*
>> > Prabu.N
>> >
>> >
>> >
>> >
>> >
>> > On Fri, Apr 5, 2013 at 3:58 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=2>>
>> wrote:
>> >
>> > > Thanks Chris/Claus it worked,
>> > >
>> > >
>> > > Hi Chris/Claus,
>> > >
>> > > When running active-mq 5.8 i am getting following issue,do you have
>> any
>> > > idea.
>> > >
>> > > 2013-04-05 05:26:16,312 | WARN  | Async error occurred:
>> > > java.lang.IllegalStateException: Cannot add a consumer to a
>> connection
>> > that
>> > > had not been registered:
>> > >
>> > >
>> > > *Regards*
>> > > Prabu.N
>> > >
>> > >
>> > >
>> > >
>> > > On Thu, Apr 4, 2013 at 6:55 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=3>>
>> wrote:
>> > >
>> > >> 1.) You're NOT using my code - it's still the same as you had before
>> > >> 2.) You're still calling setHeader(java.lang.String,
>> java.lang.String)
>> > >>      even though I tried to tell you that it has to be
>> > >>      setHeader(java.lang.String, org.apache.camel.Expression)
>> > >>
>> > >> On Wed, Apr 3, 2013 at 2:51 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=4>>
>> wrote:
>> > >> > Please kindly help me...
>> > >> >
>> > >> > On Apr 3, 2013 8:54 PM, "Prabu" <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=5>>
>> wrote:
>> > >> >>
>> > >> >> Hi Chris,
>> > >> >>
>> > >> >> I used your code.But i am getting following compilation error
>> > >> >>
>> > >> >> lder.java:92: cannot find symbol
>> > >> >> symbol  : method setHeader(java.lang.String,java.lang.String)
>> > >> >> location: class org.apache.camel.model.ChoiceDefinition
>> > >> >>                   .otherwise().setHeader("MyHeader","sdfsdf")
>> > >> >>
>> > >> >>
>> > >> >> Note: I am using camel 2.10 version
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >> On Wed, Apr 3, 2013 at 8:22 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=6>>
>>
>> > >> wrote:
>> > >> >>>
>> > >> >>> Hi Prabu,
>> > >> >>>
>> > >> >>> I don't mind helping, but could you continue to use the
>> > >> >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=7>rather then my private email?  That way, if
>> > >> >>> other people have similar issues, they can benefit.
>> > >> >>>
>> > >> >>>
>> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
>> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> > >> >>>            .otherwise()
>> > >> >>>            .setHeader("MyHeader", constant("some-value"))  //
>> <===
>> > Set
>> > >> >>> Header
>> > >> >>>            .to(ERQ_QNAME)
>> > >> >>>    .end();
>> > >> >>>
>> > >> >>> This technique will use the "simple" language function
>> "constant" to
>> > >> >>> set a string constant value.
>> > >> >>> If the value you need to set is dynamic, then you could use a
>> > >> >>> property placeholder.
>> > >> >>>
>> > >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
>> > >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> > >> >>>            .otherwise()
>> > >> >>>            .setHeader("MyHeader", constant("{{some-prop}}"))  //
>> > <===
>> > >> Set
>> > >> >>> Header
>> > >> >>>            .to(ERQ_QNAME)
>> > >> >>>    .end();
>> > >> >>>
>> > >> >>> There are even more sophisticated ways to acquire dynamic
>> values:
>> > >> >>>
>> > >> >>> http://camel.apache.org/python.html
>> > >> >>>
>> > >> >>> Regards,
>> > >> >>>
>> > >> >>> Chris
>> > >> >>>
>> > >> >>> On Wed, Apr 3, 2013 at 9:52 AM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=8>>
>> wrote:
>> > >> >>> > I have code like this,
>> > >> >>> >
>> > >> >>> >     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice()
>> > >> >>> >
>> .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> > >> >>> >           .otherwise().to(ERQ_QNAME)
>> > >> >>> >    .end();
>> > >> >>> >
>> > >> >>> >     from(DEACTIVATIN_TYPE_SPECIFIC_QNAME).choice()
>> > >> >>> >
>> > >> >>> > .when(ALERT_FAILURE_HANDLER_PREDICATE).to(ALERT_FAILURE_QNAME)
>> > >> >>> >           .otherwise().to(ERQ_QNAME)
>> > >> >>> >     .end();
>> > >> >>> >
>> > >> >>> > I want to set some values to header inside otherwise that is
>> > before
>> > >> >>> > message
>> > >> >>> > move to ERQ_QNAME.
>> > >> >>> >
>> > >> >>> > please kindly help me how to do that.
>> > >> >>> >
>> > >> >>> > Regards
>> > >> >>> > Prabu.N
>> > >> >>> >
>> > >> >>> >
>> > >> >>> > On Tue, Apr 2, 2013 at 10:52 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=9>>
>>
>> > >> wrote:
>> > >> >>> >>
>> > >> >>> >> No,i didn't received ...
>> > >> >>> >>
>> > >> >>> >> Regards
>> > >> >>> >> Prabu.N
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >> On Tue, Apr 2, 2013 at 7:31 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=10>
>> > >
>> > >> >>> >> wrote:
>> > >> >>> >>>
>> > >> >>> >>> Hi Prabu,
>> > >> >>> >>>
>> > >> >>> >>> Just out of curiosity - I am wondering if saw my email I
>> sent
>> > >> >>> >>> yesterday in response to your question?
>> > >> >>> >>> I sent it to "[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=11>"
>> with the subject,
>> > >> >>> >>> "Content-based routing with Expressions and Predicates"...
>> > >> >>> >>>
>> > >> >>> >>> Regards,
>> > >> >>> >>>
>> > >> >>> >>> Chris
>> > >> >>> >>>
>> > >> >>> >>> On Tue, Apr 2, 2013 at 4:17 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=12>
>> > >> >>> >>> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=13>>
>> wrote:
>> > >> >>> >>> > I have found solution in internet using Predicate  we can
>> > >> achieve
>> > >> >>> >>> > this,
>> > >> >>> >>> >
>> > >> >>> >>> > But,one doubt in the link
>> > >> >>> >>> > http://camel.apache.org/predicate.html,Theymentioned that
>> we
>> > >> can
>> > >> >>> >>> > use
>> > >> >>> >>> > AND and OR in Predicate
>> > >> >>> >>> >
>> > >> >>> >>> > I have added below code in project,But i am getting
>> > compilation
>> > >> >>> >>> > error.Please kindly help
>> > >> >>> >>> >
>> > >> >>> >>> > *Predicate god = and(admin, or(body().contains("Camel
>> Rider"),
>> > >> >>> >>> > header("type").isEqualTo("god")));*
>> > >> >>> >>> >
>> > >> >>> >>> > *Thanks*
>> > >> >>> >>> > Prabu.N
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=14>>
>>
>> > >> wrote:
>> > >> >>> >>> >
>> > >> >>> >>> >> Hi *Chris / **Claus*,
>> > >> >>> >>> >>
>> > >> >>> >>> >> I have one *Inbound* queue,based on header and content
>> type,I
>> > >> want
>> > >> >>> >>> >> forward to outbound queue.
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Example 1:
>> > >> >>> >>> >> *
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Inbound.queue name : **Inbound.Test.DDD
>> > >> >>> >>> >> Outbound.queue name : SOURHQueueName
>> > >> >>> >>> >>
>> > >> >>> >>> >> *
>> > >> >>> >>> >> *Criteria or Condition :
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
>> > >> >>> >>> >>    *AND*
>> > >> >>> >>> >> Message *Type* value is : *card.test *or*
>> card.expiry.test*
>> > >> >>> >>> >>
>> > >> >>> >>> >> *Example 2:*
>> > >> >>> >>> >>
>> > >> >>> >>> >> *Inbound.queue name : **Inbound.Test.SSS
>> > >> >>> >>> >> Outbound.queue name : WESTQueueName
>> > >> >>> >>> >> *
>> > >> >>> >>> >> *Criteria or Condition :*
>> > >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
>> > >> >>> >>> >>  *AND
>> > >> >>> >>> >> *
>> > >> >>> >>> >> Message *Type *value *start with* :*card.event*
>> > >> >>> >>> >>
>> > >> >>> >>> >> I want achieve this using camel routing java DSL.
>> > >> >>> >>> >>
>> > >> >>> >>> >> Please help me.How can i use AND,OR and regular
>> expression in
>> > >> >>> >>> >> camel
>> > >> >>> >>> >> routing
>> > >> >>> >>> >>
>> > >> >>> >>> >> *Regards*
>> > >> >>> >>> >> Prabu.N
>> > >> >>> >>> >>
>> > >> >>> >>> >>
>> > >> >>> >>> >> On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
>> > >> >>> >>> >> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730662&i=15>>
>> wrote:
>> > >> >>> >>> >>
>> > >> >>> >>> >>> Hi Claus,
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> Thanks for the response - I could not see any obvious
>> way to
>> > >> >>> >>> >>> configure
>> > >> >>> >>> >>> an FTP Consumer at ***runtime***,
>> > >> >>> >>> >>> either via bean, processor or consumer template.  If you
>> > have
>> > >> a
>> > >> >>> >>> >>> concrete example, that would be great to see...
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> ...otherwise, here's the solution I came up with:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>     -Chris
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   // simulate incoming message from JMS...
>> > >> >>> >>> >>>   from("timer:kickoff?repeatCount=1")
>> > >> >>> >>> >>>   .to("direct:start");
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   // upon receipt of FTP config from JMS, invoke
>> > >>  FtpConfigurer
>> > >> >>> >>> >>> bean
>> > >> >>> >>> >>> to reconfigure
>> > >> >>> >>> >>>   // FTP route, then start it...
>> > >> >>> >>> >>>   from("direct:start")
>> > >> >>> >>> >>>   .beanRef("configRdr") // config reader bean not shown
>> here
>> > >> >>> >>> >>>   .convertBodyTo(Document.class)
>> > >> >>> >>> >>>   // sets a bunch of headers from DOM, e.g.:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> String.class)
>> > >> >>> >>> >>>   .setHeader("ftp-route-id", constant("ftp.route"))
>> > >> >>> >>> >>>   .beanRef("ftpConfigurer");
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   // FTP route will only be started by FtpConfigurer
>> bean
>> > >> after
>> > >> >>> >>> >>> it's
>> > >> >>> >>> >>> dynamically re-configured...
>> > >> >>> >>> >>>   from("ftp://bogushost/bogusdir?startScheduler=false")
>> //
>> > >> the
>> > >> >>> >>> >>> URI
>> > >> >>> >>> >>> will be reconfigured...
>> > >> >>> >>> >>>   .routeId("ftp.route").noAutoStartup()
>> > >> >>> >>> >>>   .log("Received file ${file:onlyname}")
>> > >> >>> >>> >>>   .to("file:/tmp/local/data");
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>   public class FtpConfigurer {
>> > >> >>> >>> >>>     public void configureFtpConsumer(Exchange exchange)
>> > throws
>> > >> >>> >>> >>> Exception
>> > >> >>> >>> >>> {
>> > >> >>> >>> >>>         CamelContext context = exchange.getContext();
>> > >> >>> >>> >>>         Map<String, Object> headers =
>> > >> >>> >>> >>> exchange.getIn().getHeaders();
>> > >> >>> >>> >>>         Map<String, Object> parameters = new
>> HashMap<String,
>> > >> >>> >>> >>> Object>();
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // Filter headers for ftp-config specific
>> headers...
>> > >> >>> >>> >>>         for (Map.Entry<String, Object> entry :
>> > >> >>> >>> >>> headers.entrySet()) {
>> > >> >>> >>> >>>             String key = entry.getKey();
>> > >> >>> >>> >>>             if (key.startsWith("ftp-config."))
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> parameters.put(key.substring("ftp-config.".length()),
>> > >> >>> >>> >>> entry.getValue());
>> > >> >>> >>> >>>         }
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         String routeId =
>> > >> >>> >>> >>> exchange.getIn().getHeader("ftp-route-id",
>> > >> >>> >>> >>> String.class);
>> > >> >>> >>> >>>         Route ftpRoute = context.getRoute(routeId);
>> > >> >>> >>> >>>         FtpConsumer c = (FtpConsumer)
>> > ftpRoute.getConsumer();
>> > >> >>> >>> >>>         FtpEndpoint<FTPFile> rfe =
>> (FtpEndpoint<FTPFile>)
>> > >> >>> >>> >>> c.getEndpoint();
>> > >> >>> >>> >>>         FtpConfiguration rfc = rfe.getConfiguration();
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // Need to crack open FtpConsumer's
>> "endpointPath"
>> > >> field
>> > >> >>> >>> >>> since
>> > >> >>> >>> >>>         // there's no mutator (setter)
>> > >> >>> >>> >>>         Class<?> cls = c.getClass();
>> > >> >>> >>> >>>         Field endpointPath_fld =
>> > >> >>> >>> >>> cls.getDeclaredField("endpointPath");
>> > >> >>> >>> >>>         endpointPath_fld.setAccessible(true);
>> > >> >>> >>> >>>         endpointPath_fld.set(c,
>> > >> >>> >>> >>> (String)parameters.get("directory"));
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // Need to crack open FtpEndpoint, actually
>> > >> >>> >>> >>> DefaultEndpoint -
>> > >> >>> >>> >>> the ultimate base class
>> > >> >>> >>> >>>         // since there's no mutator (setter) for the
>> > >> >>> >>> >>> "endpointUri"
>> > >> >>> >>> >>> field
>> > >> >>> >>> >>>         cls = rfe.getClass();
>> > >> >>> >>> >>>         Field endpointUri_fld = null;
>> > >> >>> >>> >>>         while (endpointUri_fld == null) {
>> > >> >>> >>> >>>             // TODO: maybe change logic to just stop at
>> > >> >>> >>> >>> class=DefaultEndpoint
>> > >> >>> >>> >>>             // rather then using NoSuchFieldException
>> > >> >>> >>> >>>             try {
>> > >> >>> >>> >>>                 endpointUri_fld =
>> > >> >>> >>> >>> cls.getDeclaredField("endpointUri");
>> > >> >>> >>> >>>             } catch (NoSuchFieldException nsfe) {
>> > >> >>> >>> >>>                 cls = cls.getSuperclass();
>> > >> >>> >>> >>>             }
>> > >> >>> >>> >>>         }
>> > >> >>> >>> >>>         endpointUri_fld.setAccessible(true);
>> > >> >>> >>> >>>         endpointUri_fld.set(rfe,
>> > >> >>> >>> >>>             String.format("ftp://%s/%s",
>> > >> >>> >>> >>> (String)parameters.get("host"),
>> > >> >>> >>> >>> (String)parameters.get("directory")));
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         // set reference properties first as they use #
>> > syntax
>> > >> >>> >>> >>> that
>> > >> >>> >>> >>> fools the regular properties setter
>> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
>> rfc,
>> > >> >>> >>> >>> parameters);
>> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfc,
>> > >> parameters);
>> > >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context,
>> rfe,
>> > >> >>> >>> >>> parameters);
>> > >> >>> >>> >>>         EndpointHelper.setProperties(context, rfe,
>> > >> parameters);
>> > >> >>> >>> >>>         c.setStartScheduler(true);
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>         context.startRoute(routeId);
>> > >> >>> >>> >>>   }
>> > >> >>> >>> >>> }
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden
>> > >> >>> >>> >>> email]<
>> http://user/SendEmail.jtp?type=node&node=5730166&i=0
>> > >>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> > Hi
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > See this EIP
>> > >> >>> >>> >>> > http://camel.apache.org/content-enricher.html
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > About pollEnrich.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > Though pollEnrich currently does support dynamic uris.
>> Its
>> > >> on
>> > >> >>> >>> >>> > the
>> > >> >>> >>> >>> roadmap,
>> > >> >>> >>> >>> > for Camel 3.0.
>> > >> >>> >>> >>> > It requires an API change and thus isn't so easy to
>> > >> implement
>> > >> >>> >>> >>> > currently
>> > >> >>> >>> >>> on
>> > >> >>> >>> >>> > 2.x.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > You can always use a java bean / camel processor, and
>> > >> consume
>> > >> >>> >>> >>> > the
>> > >> >>> >>> >>> > ftp
>> > >> >>> >>> >>> file
>> > >> >>> >>> >>> > from java code.
>> > >> >>> >>> >>> > For example using consumer template.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > As you use FTP you may want to set disconnect=true so
>> the
>> > >> >>> >>> >>> > connect
>> > >> >>> >>> >>> > is
>> > >> >>> >>> >>> not
>> > >> >>> >>> >>> > remained open after usage.
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden
>> > >> >>> >>> >>> > email]<
>> > http://user/SendEmail.jtp?type=node&node=5730166&i=1
>> > >> >>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >> Ok, I'm starting to get it - a little bit.  As for my
>> > >> concrete
>> > >> >>> >>> >>> >> example, so far, I have:
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>                 from("direct:start")
>> > >> >>> >>> >>> >>                 .beanRef("config")
>> > >> >>> >>> >>> >>                 .convertBodyTo(Document.class)
>> > >> >>> >>> >>> >>                 .recipientList().xquery(
>> > >> >>> >>> >>> >>                     "concat('ftp://'" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/server/@value" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> +
>> > >> >>> >>> >>> >>                     ",'?noop=true&amp;username='" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
>> > >> >>> >>> >>> >>                     ",'&amp;password='" +
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> ",//remote[vendorId/@value='CBOE34']/password/@value)",
>> > >> >>> >>> >>> >> String.class);
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> Here's the problem - this will create an FTP Producer
>> -
>> > >> that's
>> > >> >>> >>> >>> >> not
>> > >> >>> >>> >>> >> what I need.  I need a dynamically
>> > >> >>> >>> >>> >> constructed URI for a polling FTP consumer.  I don't
>> > think
>> > >> >>> >>> >>> >> "recipientList" will work...   Any ideas?
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> Thanks,
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> Chris
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden
>> > >> >>> >>> >>> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>> >> > Hi Claus,
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > I hate to ask this - but I still don't get it.  I
>> > thought
>> > >> >>> >>> >>> >> > "recipientList" was for sending to multiple,
>> > >> runtime-defined
>> > >> >>> >>> >>> >> > recipients.  I don't see how this
>> > >> >>> >>> >>> >> > answers the question of sending to one, single
>> > recipient,
>> > >> >>> >>> >>> >> > whose
>> > >> >>> >>> >>> >> > URI
>> > >> >>> >>> >>> is
>> > >> >>> >>> >>> >> > dynamically constructed - and in my use-case the
>> > dynamic
>> > >> >>> >>> >>> >> > settings
>> > >> >>> >>> >>> >> > are not in properties - so "simple" (property
>> > >> place-holders)
>> > >> >>> >>> >>> >> > won't
>> > >> >>> >>> >>> help
>> > >> >>> >>> >>> >> me.
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > Let me give you a concrete example.  I need to do
>> an
>> > ftp
>> > >> >>> >>> >>> >> > download
>> > >> >>> >>> >>> and
>> > >> >>> >>> >>> >> > the connection information comes from up-stream in
>> the
>> > >> route
>> > >> >>> >>> >>> >> > in
>> > >> >>> >>> >>> >> > the
>> > >> >>> >>> >>> >> > form of XML (DOM - a Document instance).
>>  Currently, I
>> > am
>> > >> >>> >>> >>> >> > trying
>> > >> >>> >>> >>> >> > to
>> > >> >>> >>> >>> do
>> > >> >>> >>> >>> >> > this with bean binding and method params decorated
>> with
>> > >> >>> >>> >>> >> > @XPath
>> > >> >>> >>> >>> >> > pointing into the Document with the ftp settings
>> and
>> > >> inside
>> > >> >>> >>> >>> >> > the
>> > >> >>> >>> >>> >> > this method doing:
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > FtpComponent ftpComponent =
>> context.getComponent("ftp",
>> > >> >>> >>> >>> >> FtpComponent.class);
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > ..and then attempt to get the endpoint and call
>> > >> >>> >>> >>> >> > createConsumer(...).
>> > >> >>> >>> >>> >> > I'm sure this is not the right way to do it, but I
>> > don't
>> > >> see
>> > >> >>> >>> >>> >> > how
>> > >> >>> >>> >>> else
>> > >> >>> >>> >>> >> > - any ideas?
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > Thanks,
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > Chris
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen
>> <[hidden
>> > >> >>> >>> >>> >> >
>> > >> >>> >>> >>> >> > email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> wrote:
>> > >> >>> >>> >>> >> >> Hi
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> See this FAQ
>> > >> >>> >>> >>> >> >>
>> > >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=4>
>> > >> >>> >>> >>> >> >> <[hidden
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>> Thanks Walzer..
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>> *Queston1:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>> *Example*
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> .when(header("foo").isEqualTo("bar"))
>> > >> >>> >>> >>> >> >>>                     .to("direct:b")
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> In my case i have to add more than 80 condition
>> and
>> > >> >>> >>> >>> >> >>> forwards
>> > >> >>> >>> >>> >> >>> to 80
>> > >> >>> >>> >>> >> >>> different queues.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Above example i can only hard-code queue name,But
>> > what
>> > >> i
>> > >> >>> >>> >>> >> >>> want
>> > >> >>> >>> >>> >> >>> is
>> > >> >>> >>> >>> below.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> * .when(header("Type").isNotNull())
>> > >> >>> >>> >>> >> >>>     .to("activemq.Inbound."+header("Type"))
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Example:If queue type is test,It should forward
>> to
>> > >> >>> >>> >>> >> >>> *Inbound.test*
>> > >> >>> >>> >>> >> queue.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Above example i tried,but it did not
>> worked,created
>> > >> queue
>> > >> >>> >>> >>> something
>> > >> >>> >>> >>> >> >>> like this *Inbound.header("type")*
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> *Question2*:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> from("direct:a")
>> > >> >>> >>> >>> >> >>>             .multicast().to("direct:b",
>> "direct:c",
>> > >> >>> >>> >>> >> >>> "direct:d");
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Based on messages header and content type i want
>> > >> forward
>> > >> >>> >>> >>> >> >>> to
>> > >> >>> >>> >>> different
>> > >> >>> >>> >>> >> >>> queue.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> condition will be *OR *and *AND*.How can i do
>> that
>> > like
>> > >> >>> >>> >>> >> >>> above
>> > >> >>> >>> >>> example.*
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Thanks in advance*
>> > >> >>> >>> >>> >> >>> *
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> *Regards*
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> Prabu.N
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas
>> [via
>> > >> >>> >>> >>> >> >>> Camel] <
>> > >> >>> >>> >>> >> >>> [hidden
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
>> > >> >>> >>> >>> wrote:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> > Hi,
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > you could start by reading Claus´ book (p.
>> 44ff)
>> > >> which
>> > >> >>> >>> >>> >> >>> > has a
>> > >> >>> >>> >>> perfect
>> > >> >>> >>> >>> >> >>> > example or
>> > >> >>> >>> >>> >> >>> >
>> http://camel.apache.org/content-based-router.html
>> > >> >>> >>> >>> >> >>> > (just
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> >> >>> > replace the direct: with your queues).
>> > >> >>> >>> >>> >> >>> > If you need to fire your messages to multiple
>> > queues:
>> > >> >>> >>> >>> >> >>> >
>> > >> http://camel.apache.org/publish-subscribe-channel.html
>> > >> >>> >>> >>> >> >>> > shows
>> > >> >>> >>> >>> you the
>> > >> >>> >>> >>> >> >>> > various ways.
>> > >> >>> >>> >>> >> >>> > When you get the concepts you can just "lego"
>> them
>> > >> >>> >>> >>> >> >>> > together.
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > Regards, Thomas.
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>> > >> >>> >>> >>> >> >>>
>> http://user/SendEmail.jtp?type=node&node=5730116&i=0
>> > >"
>> > >> >>> >>> >>> >> >>> > <[hidden email] <
>> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>>
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > > Hi Claus,
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > Thanks so much Clus for help.It is working
>> now.
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > I need your guidance for the following
>> > requirement.
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > 1.I have one *inbound queue* it will receive
>> > >> message
>> > >> >>> >>> >>> frequently
>> > >> >>> >>> >>> >> from my
>> > >> >>> >>> >>> >> >>> > > application.
>> > >> >>> >>> >>> >> >>> > > 2.From *inbound queue* i need camel routing
>> to
>> > move
>> > >> >>> >>> >>> >> >>> > > message
>> > >> >>> >>> >>> from
>> > >> >>> >>> >>> >> >>> > > another *message
>> > >> >>> >>> >>> >> >>> > > based inbound queue* based on message header
>> > value.
>> > >> >>> >>> >>> >> >>> > > 3.From *message based inbound queue *i* *need
>> > camel
>> > >> >>> >>> >>> >> >>> > > routing to
>> > >> >>> >>> >>> move
>> > >> >>> >>> >>> >> >>> > message
>> > >> >>> >>> >>> >> >>> > > to *one or more outbound queue *based on
>> message
>> > >> >>> >>> >>> >> >>> > > content*
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > I need *camel java DSL*sample code for above
>> > >> >>> >>> >>> >> >>> > > requirement.*
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > > *
>> > >> >>> >>> >>> >> >>> > > *Thanks in advance*
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus
>> Ibsen-2
>> > [via
>> > >> >>> >>> >>> >> >>> > > Camel]
>> > >> >>> >>> >>> >> >>> > > <
>> > >> >>> >>> >>> >> >>> > > [hidden email] <
>> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>>
>> > >> >>> >>> >>> >> >>> > wrote:
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >> Hi
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> Do as the exception tells you. Check route
>> 2.
>> > You
>> > >> >>> >>> >>> >> >>> > >> route
>> > >> >>> >>> >>> >> >>> > >> from
>> > >> >>> >>> >>> >> >>> > >> "Inbound.SSS.TestEvent". And that is now
>> know to
>> > >> >>> >>> >>> >> >>> > >> Camel.
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> Maybe you need to add "activemq:" as prefix
>> so
>> > its
>> > >> >>> >>> >>> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden
>> email]<
>> > >> >>> >>> >>> >> >>> >
>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0
>> > >> >
>> > >> >>> >>> >>> >> >>> > >> <[hidden email] <
>> > >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
>> > >> >>> >>> >>> >> >>> >>
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > >> wrote:
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I have activemmq  Project in that i have
>> > >> following
>> > >> >>> >>> >>> requirement
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> 1.Move message from Inbound queue to type
>> based
>> > >> >>> >>> >>> >> >>> > >>> inbound
>> > >> >>> >>> >>> queue.
>> > >> >>> >>> >>> >> >>> > >>> 2.Move message from Message type inbound
>> queue
>> > to
>> > >> >>> >>> >>> >> >>> > >>> outbound
>> > >> >>> >>> >>> queue
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I have created two bean for to achieve
>> this.
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> 1.one for move from inbound to message type
>> > >>  inbound
>> > >> >>> >>> >>> >> >>> > >>> queue
>> > >> >>> >>> >>> >> >>> > >>> 2.one for move from inbound to outbound
>> queue.
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I have following entry in camel.xml
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>   <camelContext id="camel" xmlns="
>> > >> >>> >>> >>> >> >>> > http://camel.apache.org/schema/spring">
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>                <routeBuilder
>> ref="routeBuilder"
>> > >> />
>> > >> >>> >>> >>> >> >>> > >>>            <routeBuilder
>> ref="routeBuilder1" />
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>    </camelContext>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder"
>> > >> >>> >>> >>> >> >>> > >>>
>> > class="com.camel.routes.SinglecastRouteBuilder"/>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator"
>> > >> >>> >>> >>> >> >>> > >>>
>> class="com.camel.routes.TypeSpecificListBean"/>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder1"
>> > >> >>> >>> >>> >> >>> > >>>
>> > class="com.camel.routes.MulticastRouteBuilder"/>
>> > >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator1"
>> > >> >>> >>> >>> >> >>> > >>>
>> class="com.camel.routes.RecipientListBean"/>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> When i run application i am getting
>> following
>> > >> error.
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> * java.lang.Exception:
>> > >> >>> >>> >>> org.apache.camel.RuntimeCamelException:
>> > >> >>> >>> >>> >> >>> > >>> org.apache.camel.Fa
>> > >> >>> >>> >>> >> >>> > >>> iledToCreateRouteException: Failed to
>> create
>> > >> route
>> > >> >>> >>> >>> >> >>> > >>> route2:
>> > >> >>> >>> >>> >> >>> > >>> Route[[From[Inbound.G
>> > >> >>> >>> >>> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:...
>> > >> because
>> > >> >>> >>> >>> >> >>> > >>> of No
>> > >> >>> >>> >>> endpoint
>> > >> >>> >>> >>> >> >>> > could
>> > >> >>> >>> >>> >> >>> > >> be
>> > >> >>> >>> >>> >> >>> > >>> found
>> > >> >>> >>> >>> >> >>> > >>> for: Inbound.SSS.TestEvent, please check
>> your
>> > >> >>> >>> >>> >> >>> > >>> classpath
>> > >> >>> >>> >>> contains
>> > >> >>> >>> >>> >> the
>> > >> >>> >>> >>> >> >>> > >> needed
>> > >> >>> >>> >>> >> >>> > >>> Cam
>> > >> >>> >>> >>> >> >>> > >>> el component jar.*
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> I am not sure i am missing any
>> > >> configuration,Please
>> > >> >>> >>> >>> >> >>> > >>> kindly
>> > >> >>> >>> >>> help
>> > >> >>> >>> >>> >> me
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>>
>> > >> >>> >>> >>> >> >>> > >>> --
>> > >> >>> >>> >>> >> >>> > >>> View this message in context:
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >>
>> > >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>> > >> >>> >>> >>> >> >>> > >>> Sent from the Camel - Users mailing list
>> > archive
>> > >> at
>> > >> >>> >>> >>> Nabble.com.
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> --
>> > >> >>> >>> >>> >> >>> > >> Claus Ibsen
>> > >> >>> >>> >>> >> >>> > >> -----------------
>> > >> >>> >>> >>> >> >>> > >> Red Hat, Inc.
>> > >> >>> >>> >>> >> >>> > >> FuseSource is now part of Red Hat
>> > >> >>> >>> >>> >> >>> > >> Email: [hidden email]<
>> > >> >>> >>> >>> >> >>> >
>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2
>> > >> >
>> > >> >>> >>> >>> >> >>> > >> Web: http://fusesource.com
>> > >> >>> >>> >>> >> >>> > >> Twitter: davsclaus
>> > >> >>> >>> >>> >> >>> > >> Blog: http://davsclaus.com
>> > >> >>> >>> >>> >> >>> > >> Author of Camel in Action:
>> > >> >>> >>> >>> >> >>> > >> http://www.manning.com/ibsen
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >> ------------------------------
>> > >> >>> >>> >>> >> >>> > >> If you reply to this email, your message
>> will be
>> > >> >>> >>> >>> >> >>> > >> added to
>> > >> >>> >>> >>> >> >>> > >> the
>> > >> >>> >>> >>> >> >>> > discussion
>> > >> >>> >>> >>> >> >>> > >> below:
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > >> .
>> > >> >>> >>> >>> >> >>> > >> 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
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > >>
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > --
>> > >> >>> >>> >>> >> >>> > > Thanks & Regards
>> > >> >>> >>> >>> >> >>> > > Prabu.N
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > >
>> > >> >>> >>> >>> >> >>> > > --
>> > >> >>> >>> >>> >> >>> > > View this message in context:
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > > Sent from the Camel - Users mailing list
>> archive
>> > at
>> > >> >>> >>> >>> Nabble.com.
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> > ------------------------------
>> > >> >>> >>> >>> >> >>> >  If you reply to this email, your message will
>> be
>> > >> added
>> > >> >>> >>> >>> >> >>> > to
>> > >> >>> >>> >>> >> >>> > the
>> > >> >>> >>> >>> >> discussion
>> > >> >>> >>> >>> >> >>> > below:
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>> > >> >>> >>> >>> >> >>> >  To unsubscribe from Camel routing issue, 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
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>> >
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> --
>> > >> >>> >>> >>> >> >>> Thanks & Regards
>> > >> >>> >>> >>> >> >>>  Prabu.N
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>> --
>> > >> >>> >>> >>> >> >>> View this message in context:
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>> > >> >>> >>> >>> >> >>> Sent from the Camel - Users mailing list archive
>> at
>> > >> >>> >>> >>> >> >>> Nabble.com.
>> > >> >>> >>> >>> >> >>>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> --
>> > >> >>> >>> >>> >> >> Claus Ibsen
>> > >> >>> >>> >>> >> >> -----------------
>> > >> >>> >>> >>> >> >> Red Hat, Inc.
>> > >> >>> >>> >>> >> >> FuseSource is now part of Red Hat
>> > >> >>> >>> >>> >> >> Email: [hidden
>> > >> >>> >>> >>> >> >>
>> > >> >>> >>> >>> >> >> email]<
>> > >> http://user/SendEmail.jtp?type=node&node=5730166&i=7>
>> > >> >>> >>> >>> >> >> Web: http://fusesource.com
>> > >> >>> >>> >>> >> >> Twitter: davsclaus
>> > >> >>> >>> >>> >> >> Blog: http://davsclaus.com
>> > >> >>> >>> >>> >> >> Author of Camel in Action:
>> > http://www.manning.com/ibsen
>> > >> >>> >>> >>> >>
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> >
>> > >> >>> >>> >>> > --
>> > >> >>> >>> >>> > Claus Ibsen
>> > >> >>> >>> >>> > -----------------
>> > >> >>> >>> >>> > Red Hat, Inc.
>> > >> >>> >>> >>> > FuseSource is now part of Red Hat
>> > >> >>> >>> >>> > Email: [hidden
>> > >> >>> >>> >>> > email]<
>> > http://user/SendEmail.jtp?type=node&node=5730166&i=8
>> > >> >
>> > >> >>> >>> >>> > Web: http://fusesource.com
>> > >> >>> >>> >>> > Twitter: davsclaus
>> > >> >>> >>> >>> > Blog: http://davsclaus.com
>> > >> >>> >>> >>> > Author of Camel in Action:
>> http://www.manning.com/ibsen
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>> ------------------------------
>> > >> >>> >>> >>>  If you reply to this email, your message will be added
>> to
>> > the
>> > >> >>> >>> >>> discussion below:
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >> >>> >>> >>>
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
>> > >> >>> >>> >>>  To unsubscribe from Camel routing issue, 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
>> > >> >
>> > >> >>> >>> >>>
>> > >> >>> >>> >>
>> > >> >>> >>> >>
>> > >> >>> >>> >>
>> > >> >>> >>> >> --
>> > >> >>> >>> >> Thanks & Regards
>> > >> >>> >>> >>  Prabu.N
>> > >> >>> >>> >>
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> > --
>> > >> >>> >>> > Thanks & Regards
>> > >> >>> >>> >  Prabu.N
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >> >>> >>> > --
>> > >> >>> >>> > View this message in context:
>> > >> >>> >>> >
>> > >> >>> >>> >
>> > >>
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
>> > >> >>> >>> > Sent from the Camel - Users mailing list archive at
>> > Nabble.com.
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >>
>> > >> >>> >> --
>> > >> >>> >> Thanks & Regards
>> > >> >>> >>  Prabu.N
>> > >> >>> >
>> > >> >>> >
>> > >> >>> >
>> > >> >>> >
>> > >> >>> > --
>> > >> >>> > Thanks & Regards
>> > >> >>> >  Prabu.N
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >> --
>> > >> >> Thanks & Regards
>> > >> >>  Prabu.N
>> > >>
>> > >
>> > >
>> > >
>> > > --
>> > > Thanks & Regards
>> > >  Prabu.N
>> > >
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> >  Prabu.N
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730590.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730662.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730914.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by Chris Wolf <cw...@gmail.com>.
You're asking about a problem with "CARD_EVENT_PREDICATE" without including
the definition of that?


On Tue, Apr 9, 2013 at 8:31 AM, prabumca06@gmail.com
<pr...@gmail.com>wrote:

> Hi Chris,
>
> from(CARD_TYPE_SPECIFIC_QNAME).choice()
> .when(SCHEDULE_PREDICATE).multicast().to(CARD_QNAME,SCHEDULE_QNAME);
> .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
> .otherwise()
> .setHeader(PROPERTY_ORIGINAL_DESTINATION,
> constant(PROPERTY_ORIGINAL_DESTINATION_VALUE))
> .to(ERQ_QNAME)
> .end();
>
> When i compile above code i am getting followin
>
> lder.java:115: illegal start of expression
>     .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
>               ^
>
> Please kindly help me,i am doing any syntax mistake here
>
> *Regards*
> Prabu.N
>
>
>
>
>
> On Fri, Apr 5, 2013 at 3:58 PM, Prabu <pr...@gmail.com> wrote:
>
> > Thanks Chris/Claus it worked,
> >
> >
> > Hi Chris/Claus,
> >
> > When running active-mq 5.8 i am getting following issue,do you have any
> > idea.
> >
> > 2013-04-05 05:26:16,312 | WARN  | Async error occurred:
> > java.lang.IllegalStateException: Cannot add a consumer to a connection
> that
> > had not been registered:
> >
> >
> > *Regards*
> > Prabu.N
> >
> >
> >
> >
> > On Thu, Apr 4, 2013 at 6:55 PM, Chris Wolf <cw...@gmail.com> wrote:
> >
> >> 1.) You're NOT using my code - it's still the same as you had before
> >> 2.) You're still calling setHeader(java.lang.String, java.lang.String)
> >>      even though I tried to tell you that it has to be
> >>      setHeader(java.lang.String, org.apache.camel.Expression)
> >>
> >> On Wed, Apr 3, 2013 at 2:51 PM, Prabu <pr...@gmail.com> wrote:
> >> > Please kindly help me...
> >> >
> >> > On Apr 3, 2013 8:54 PM, "Prabu" <pr...@gmail.com> wrote:
> >> >>
> >> >> Hi Chris,
> >> >>
> >> >> I used your code.But i am getting following compilation error
> >> >>
> >> >> lder.java:92: cannot find symbol
> >> >> symbol  : method setHeader(java.lang.String,java.lang.String)
> >> >> location: class org.apache.camel.model.ChoiceDefinition
> >> >>                   .otherwise().setHeader("MyHeader","sdfsdf")
> >> >>
> >> >>
> >> >> Note: I am using camel 2.10 version
> >> >>
> >> >>
> >> >>
> >> >> On Wed, Apr 3, 2013 at 8:22 PM, Chris Wolf <cw...@gmail.com>
> >> wrote:
> >> >>>
> >> >>> Hi Prabu,
> >> >>>
> >> >>> I don't mind helping, but could you continue to use the
> >> >>> users@camel.apache.org rather then my private email?  That way, if
> >> >>> other people have similar issues, they can benefit.
> >> >>>
> >> >>>
> >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
> >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> >> >>>            .otherwise()
> >> >>>            .setHeader("MyHeader", constant("some-value"))  // <===
> Set
> >> >>> Header
> >> >>>            .to(ERQ_QNAME)
> >> >>>    .end();
> >> >>>
> >> >>> This technique will use the "simple" language function "constant" to
> >> >>> set a string constant value.
> >> >>> If the value you need to set is dynamic, then you could use a
> >> >>> property placeholder.
> >> >>>
> >> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
> >> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> >> >>>            .otherwise()
> >> >>>            .setHeader("MyHeader", constant("{{some-prop}}"))  //
> <===
> >> Set
> >> >>> Header
> >> >>>            .to(ERQ_QNAME)
> >> >>>    .end();
> >> >>>
> >> >>> There are even more sophisticated ways to acquire dynamic values:
> >> >>>
> >> >>> http://camel.apache.org/python.html
> >> >>>
> >> >>> Regards,
> >> >>>
> >> >>> Chris
> >> >>>
> >> >>> On Wed, Apr 3, 2013 at 9:52 AM, Prabu <pr...@gmail.com> wrote:
> >> >>> > I have code like this,
> >> >>> >
> >> >>> >     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice()
> >> >>> >           .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
> >> >>> >           .otherwise().to(ERQ_QNAME)
> >> >>> >    .end();
> >> >>> >
> >> >>> >     from(DEACTIVATIN_TYPE_SPECIFIC_QNAME).choice()
> >> >>> >
> >> >>> > .when(ALERT_FAILURE_HANDLER_PREDICATE).to(ALERT_FAILURE_QNAME)
> >> >>> >           .otherwise().to(ERQ_QNAME)
> >> >>> >     .end();
> >> >>> >
> >> >>> > I want to set some values to header inside otherwise that is
> before
> >> >>> > message
> >> >>> > move to ERQ_QNAME.
> >> >>> >
> >> >>> > please kindly help me how to do that.
> >> >>> >
> >> >>> > Regards
> >> >>> > Prabu.N
> >> >>> >
> >> >>> >
> >> >>> > On Tue, Apr 2, 2013 at 10:52 PM, Prabu <pr...@gmail.com>
> >> wrote:
> >> >>> >>
> >> >>> >> No,i didn't received ...
> >> >>> >>
> >> >>> >> Regards
> >> >>> >> Prabu.N
> >> >>> >>
> >> >>> >>
> >> >>> >> On Tue, Apr 2, 2013 at 7:31 PM, Chris Wolf <cwolf.algo@gmail.com
> >
> >> >>> >> wrote:
> >> >>> >>>
> >> >>> >>> Hi Prabu,
> >> >>> >>>
> >> >>> >>> Just out of curiosity - I am wondering if saw my email I sent
> >> >>> >>> yesterday in response to your question?
> >> >>> >>> I sent it to "users@camel.apache.org" with the subject,
> >> >>> >>> "Content-based routing with Expressions and Predicates"...
> >> >>> >>>
> >> >>> >>> Regards,
> >> >>> >>>
> >> >>> >>> Chris
> >> >>> >>>
> >> >>> >>> On Tue, Apr 2, 2013 at 4:17 AM, prabumca06@gmail.com
> >> >>> >>> <pr...@gmail.com> wrote:
> >> >>> >>> > I have found solution in internet using Predicate  we can
> >> achieve
> >> >>> >>> > this,
> >> >>> >>> >
> >> >>> >>> > But,one doubt in the link
> >> >>> >>> > http://camel.apache.org/predicate.html,Theymentioned that we
> >> can
> >> >>> >>> > use
> >> >>> >>> > AND and OR in Predicate
> >> >>> >>> >
> >> >>> >>> > I have added below code in project,But i am getting
> compilation
> >> >>> >>> > error.Please kindly help
> >> >>> >>> >
> >> >>> >>> > *Predicate god = and(admin, or(body().contains("Camel Rider"),
> >> >>> >>> > header("type").isEqualTo("god")));*
> >> >>> >>> >
> >> >>> >>> > *Thanks*
> >> >>> >>> > Prabu.N
> >> >>> >>> >
> >> >>> >>> >
> >> >>> >>> > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <pr...@gmail.com>
> >> wrote:
> >> >>> >>> >
> >> >>> >>> >> Hi *Chris / **Claus*,
> >> >>> >>> >>
> >> >>> >>> >> I have one *Inbound* queue,based on header and content type,I
> >> want
> >> >>> >>> >> forward to outbound queue.
> >> >>> >>> >> *
> >> >>> >>> >> Example 1:
> >> >>> >>> >> *
> >> >>> >>> >> *
> >> >>> >>> >> Inbound.queue name : **Inbound.Test.DDD
> >> >>> >>> >> Outbound.queue name : SOURHQueueName
> >> >>> >>> >>
> >> >>> >>> >> *
> >> >>> >>> >> *Criteria or Condition :
> >> >>> >>> >> *
> >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
> >> >>> >>> >>    *AND*
> >> >>> >>> >> Message *Type* value is : *card.test *or* card.expiry.test*
> >> >>> >>> >>
> >> >>> >>> >> *Example 2:*
> >> >>> >>> >>
> >> >>> >>> >> *Inbound.queue name : **Inbound.Test.SSS
> >> >>> >>> >> Outbound.queue name : WESTQueueName
> >> >>> >>> >> *
> >> >>> >>> >> *Criteria or Condition :*
> >> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
> >> >>> >>> >>  *AND
> >> >>> >>> >> *
> >> >>> >>> >> Message *Type *value *start with* :*card.event*
> >> >>> >>> >>
> >> >>> >>> >> I want achieve this using camel routing java DSL.
> >> >>> >>> >>
> >> >>> >>> >> Please help me.How can i use AND,OR and regular expression in
> >> >>> >>> >> camel
> >> >>> >>> >> routing
> >> >>> >>> >>
> >> >>> >>> >> *Regards*
> >> >>> >>> >> Prabu.N
> >> >>> >>> >>
> >> >>> >>> >>
> >> >>> >>> >> On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
> >> >>> >>> >> ml-node+s465427n5730166h48@n5.nabble.com> wrote:
> >> >>> >>> >>
> >> >>> >>> >>> Hi Claus,
> >> >>> >>> >>>
> >> >>> >>> >>> Thanks for the response - I could not see any obvious way to
> >> >>> >>> >>> configure
> >> >>> >>> >>> an FTP Consumer at ***runtime***,
> >> >>> >>> >>> either via bean, processor or consumer template.  If you
> have
> >> a
> >> >>> >>> >>> concrete example, that would be great to see...
> >> >>> >>> >>>
> >> >>> >>> >>> ...otherwise, here's the solution I came up with:
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>     -Chris
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>   // simulate incoming message from JMS...
> >> >>> >>> >>>   from("timer:kickoff?repeatCount=1")
> >> >>> >>> >>>   .to("direct:start");
> >> >>> >>> >>>
> >> >>> >>> >>>   // upon receipt of FTP config from JMS, invoke
> >>  FtpConfigurer
> >> >>> >>> >>> bean
> >> >>> >>> >>> to reconfigure
> >> >>> >>> >>>   // FTP route, then start it...
> >> >>> >>> >>>   from("direct:start")
> >> >>> >>> >>>   .beanRef("configRdr") // config reader bean not shown here
> >> >>> >>> >>>   .convertBodyTo(Document.class)
> >> >>> >>> >>>   // sets a bunch of headers from DOM, e.g.:
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >>
> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
> >> >>> >>> >>>
> >> >>> >>> >>> String.class)
> >> >>> >>> >>>   .setHeader("ftp-route-id", constant("ftp.route"))
> >> >>> >>> >>>   .beanRef("ftpConfigurer");
> >> >>> >>> >>>
> >> >>> >>> >>>   // FTP route will only be started by FtpConfigurer bean
> >> after
> >> >>> >>> >>> it's
> >> >>> >>> >>> dynamically re-configured...
> >> >>> >>> >>>   from("ftp://bogushost/bogusdir?startScheduler=false") //
> >> the
> >> >>> >>> >>> URI
> >> >>> >>> >>> will be reconfigured...
> >> >>> >>> >>>   .routeId("ftp.route").noAutoStartup()
> >> >>> >>> >>>   .log("Received file ${file:onlyname}")
> >> >>> >>> >>>   .to("file:/tmp/local/data");
> >> >>> >>> >>>
> >> >>> >>> >>>   public class FtpConfigurer {
> >> >>> >>> >>>     public void configureFtpConsumer(Exchange exchange)
> throws
> >> >>> >>> >>> Exception
> >> >>> >>> >>> {
> >> >>> >>> >>>         CamelContext context = exchange.getContext();
> >> >>> >>> >>>         Map<String, Object> headers =
> >> >>> >>> >>> exchange.getIn().getHeaders();
> >> >>> >>> >>>         Map<String, Object> parameters = new HashMap<String,
> >> >>> >>> >>> Object>();
> >> >>> >>> >>>
> >> >>> >>> >>>         // Filter headers for ftp-config specific headers...
> >> >>> >>> >>>         for (Map.Entry<String, Object> entry :
> >> >>> >>> >>> headers.entrySet()) {
> >> >>> >>> >>>             String key = entry.getKey();
> >> >>> >>> >>>             if (key.startsWith("ftp-config."))
> >> >>> >>> >>>
> >> >>> >>> >>> parameters.put(key.substring("ftp-config.".length()),
> >> >>> >>> >>> entry.getValue());
> >> >>> >>> >>>         }
> >> >>> >>> >>>
> >> >>> >>> >>>         String routeId =
> >> >>> >>> >>> exchange.getIn().getHeader("ftp-route-id",
> >> >>> >>> >>> String.class);
> >> >>> >>> >>>         Route ftpRoute = context.getRoute(routeId);
> >> >>> >>> >>>         FtpConsumer c = (FtpConsumer)
> ftpRoute.getConsumer();
> >> >>> >>> >>>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
> >> >>> >>> >>> c.getEndpoint();
> >> >>> >>> >>>         FtpConfiguration rfc = rfe.getConfiguration();
> >> >>> >>> >>>
> >> >>> >>> >>>         // Need to crack open FtpConsumer's "endpointPath"
> >> field
> >> >>> >>> >>> since
> >> >>> >>> >>>         // there's no mutator (setter)
> >> >>> >>> >>>         Class<?> cls = c.getClass();
> >> >>> >>> >>>         Field endpointPath_fld =
> >> >>> >>> >>> cls.getDeclaredField("endpointPath");
> >> >>> >>> >>>         endpointPath_fld.setAccessible(true);
> >> >>> >>> >>>         endpointPath_fld.set(c,
> >> >>> >>> >>> (String)parameters.get("directory"));
> >> >>> >>> >>>
> >> >>> >>> >>>         // Need to crack open FtpEndpoint, actually
> >> >>> >>> >>> DefaultEndpoint -
> >> >>> >>> >>> the ultimate base class
> >> >>> >>> >>>         // since there's no mutator (setter) for the
> >> >>> >>> >>> "endpointUri"
> >> >>> >>> >>> field
> >> >>> >>> >>>         cls = rfe.getClass();
> >> >>> >>> >>>         Field endpointUri_fld = null;
> >> >>> >>> >>>         while (endpointUri_fld == null) {
> >> >>> >>> >>>             // TODO: maybe change logic to just stop at
> >> >>> >>> >>> class=DefaultEndpoint
> >> >>> >>> >>>             // rather then using NoSuchFieldException
> >> >>> >>> >>>             try {
> >> >>> >>> >>>                 endpointUri_fld =
> >> >>> >>> >>> cls.getDeclaredField("endpointUri");
> >> >>> >>> >>>             } catch (NoSuchFieldException nsfe) {
> >> >>> >>> >>>                 cls = cls.getSuperclass();
> >> >>> >>> >>>             }
> >> >>> >>> >>>         }
> >> >>> >>> >>>         endpointUri_fld.setAccessible(true);
> >> >>> >>> >>>         endpointUri_fld.set(rfe,
> >> >>> >>> >>>             String.format("ftp://%s/%s",
> >> >>> >>> >>> (String)parameters.get("host"),
> >> >>> >>> >>> (String)parameters.get("directory")));
> >> >>> >>> >>>
> >> >>> >>> >>>         // set reference properties first as they use #
> syntax
> >> >>> >>> >>> that
> >> >>> >>> >>> fools the regular properties setter
> >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context, rfc,
> >> >>> >>> >>> parameters);
> >> >>> >>> >>>         EndpointHelper.setProperties(context, rfc,
> >> parameters);
> >> >>> >>> >>>         EndpointHelper.setReferenceProperties(context, rfe,
> >> >>> >>> >>> parameters);
> >> >>> >>> >>>         EndpointHelper.setProperties(context, rfe,
> >> parameters);
> >> >>> >>> >>>         c.setStartScheduler(true);
> >> >>> >>> >>>
> >> >>> >>> >>>         context.startRoute(routeId);
> >> >>> >>> >>>   }
> >> >>> >>> >>> }
> >> >>> >>> >>>
> >> >>> >>> >>> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden
> >> >>> >>> >>> email]<http://user/SendEmail.jtp?type=node&node=5730166&i=0
> >>
> >> >>> >>> >>> wrote:
> >> >>> >>> >>>
> >> >>> >>> >>> > Hi
> >> >>> >>> >>> >
> >> >>> >>> >>> > See this EIP
> >> >>> >>> >>> > http://camel.apache.org/content-enricher.html
> >> >>> >>> >>> >
> >> >>> >>> >>> > About pollEnrich.
> >> >>> >>> >>> >
> >> >>> >>> >>> > Though pollEnrich currently does support dynamic uris. Its
> >> on
> >> >>> >>> >>> > the
> >> >>> >>> >>> roadmap,
> >> >>> >>> >>> > for Camel 3.0.
> >> >>> >>> >>> > It requires an API change and thus isn't so easy to
> >> implement
> >> >>> >>> >>> > currently
> >> >>> >>> >>> on
> >> >>> >>> >>> > 2.x.
> >> >>> >>> >>> >
> >> >>> >>> >>> > You can always use a java bean / camel processor, and
> >> consume
> >> >>> >>> >>> > the
> >> >>> >>> >>> > ftp
> >> >>> >>> >>> file
> >> >>> >>> >>> > from java code.
> >> >>> >>> >>> > For example using consumer template.
> >> >>> >>> >>> >
> >> >>> >>> >>> > As you use FTP you may want to set disconnect=true so the
> >> >>> >>> >>> > connect
> >> >>> >>> >>> > is
> >> >>> >>> >>> not
> >> >>> >>> >>> > remained open after usage.
> >> >>> >>> >>> >
> >> >>> >>> >>> >
> >> >>> >>> >>> >
> >> >>> >>> >>> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden
> >> >>> >>> >>> > email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=1
> >> >>
> >> >>> >>> >>> wrote:
> >> >>> >>> >>> >
> >> >>> >>> >>> >> Ok, I'm starting to get it - a little bit.  As for my
> >> concrete
> >> >>> >>> >>> >> example, so far, I have:
> >> >>> >>> >>> >>
> >> >>> >>> >>> >>                 from("direct:start")
> >> >>> >>> >>> >>                 .beanRef("config")
> >> >>> >>> >>> >>                 .convertBodyTo(Document.class)
> >> >>> >>> >>> >>                 .recipientList().xquery(
> >> >>> >>> >>> >>                     "concat('ftp://'" +
> >> >>> >>> >>> >>
> >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/server/@value" +
> >> >>> >>> >>> >>
> >> >>> >>> >>> >>
> >> >>> >>> >>> >>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >>
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
> >> >>> >>> >>>
> >> >>> >>> >>> >> +
> >> >>> >>> >>> >>                     ",'?noop=true&amp;username='" +
> >> >>> >>> >>> >>
> >> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> >> >>> >>> >>> >>                     ",'&amp;password='" +
> >> >>> >>> >>> >>
> >> >>> >>> >>> >> ",//remote[vendorId/@value='CBOE34']/password/@value)",
> >> >>> >>> >>> >> String.class);
> >> >>> >>> >>> >>
> >> >>> >>> >>> >> Here's the problem - this will create an FTP Producer -
> >> that's
> >> >>> >>> >>> >> not
> >> >>> >>> >>> >> what I need.  I need a dynamically
> >> >>> >>> >>> >> constructed URI for a polling FTP consumer.  I don't
> think
> >> >>> >>> >>> >> "recipientList" will work...   Any ideas?
> >> >>> >>> >>> >>
> >> >>> >>> >>> >> Thanks,
> >> >>> >>> >>> >>
> >> >>> >>> >>> >> Chris
> >> >>> >>> >>> >>
> >> >>> >>> >>> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden
> >> >>> >>> >>> >> email]<
> >> http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
> >> >>> >>> >>> wrote:
> >> >>> >>> >>> >> > Hi Claus,
> >> >>> >>> >>> >> >
> >> >>> >>> >>> >> > I hate to ask this - but I still don't get it.  I
> thought
> >> >>> >>> >>> >> > "recipientList" was for sending to multiple,
> >> runtime-defined
> >> >>> >>> >>> >> > recipients.  I don't see how this
> >> >>> >>> >>> >> > answers the question of sending to one, single
> recipient,
> >> >>> >>> >>> >> > whose
> >> >>> >>> >>> >> > URI
> >> >>> >>> >>> is
> >> >>> >>> >>> >> > dynamically constructed - and in my use-case the
> dynamic
> >> >>> >>> >>> >> > settings
> >> >>> >>> >>> >> > are not in properties - so "simple" (property
> >> place-holders)
> >> >>> >>> >>> >> > won't
> >> >>> >>> >>> help
> >> >>> >>> >>> >> me.
> >> >>> >>> >>> >> >
> >> >>> >>> >>> >> > Let me give you a concrete example.  I need to do an
> ftp
> >> >>> >>> >>> >> > download
> >> >>> >>> >>> and
> >> >>> >>> >>> >> > the connection information comes from up-stream in the
> >> route
> >> >>> >>> >>> >> > in
> >> >>> >>> >>> >> > the
> >> >>> >>> >>> >> > form of XML (DOM - a Document instance).  Currently, I
> am
> >> >>> >>> >>> >> > trying
> >> >>> >>> >>> >> > to
> >> >>> >>> >>> do
> >> >>> >>> >>> >> > this with bean binding and method params decorated with
> >> >>> >>> >>> >> > @XPath
> >> >>> >>> >>> >> > pointing into the Document with the ftp settings and
> >> inside
> >> >>> >>> >>> >> > the
> >> >>> >>> >>> >> > this method doing:
> >> >>> >>> >>> >> >
> >> >>> >>> >>> >> > FtpComponent ftpComponent = context.getComponent("ftp",
> >> >>> >>> >>> >> FtpComponent.class);
> >> >>> >>> >>> >> >
> >> >>> >>> >>> >> > ..and then attempt to get the endpoint and call
> >> >>> >>> >>> >> > createConsumer(...).
> >> >>> >>> >>> >> > I'm sure this is not the right way to do it, but I
> don't
> >> see
> >> >>> >>> >>> >> > how
> >> >>> >>> >>> else
> >> >>> >>> >>> >> > - any ideas?
> >> >>> >>> >>> >> >
> >> >>> >>> >>> >> > Thanks,
> >> >>> >>> >>> >> >
> >> >>> >>> >>> >> >
> >> >>> >>> >>> >> > Chris
> >> >>> >>> >>> >> >
> >> >>> >>> >>> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden
> >> >>> >>> >>> >> >
> >> >>> >>> >>> >> > email]<
> >> http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
> >> >>> >>> >>>
> >> >>> >>> >>> >> wrote:
> >> >>> >>> >>> >> >> Hi
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >> See this FAQ
> >> >>> >>> >>> >> >>
> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >> email]<
> >> http://user/SendEmail.jtp?type=node&node=5730166&i=4>
> >> >>> >>> >>> >> >> <[hidden
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >> email]<
> >> http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
> >> >>> >>> >>>
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >>> Thanks Walzer..
> >> >>> >>> >>> >> >>> *
> >> >>> >>> >>> >> >>> *
> >> >>> >>> >>> >> >>> *Queston1:
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> *
> >> >>> >>> >>> >> >>> *Example*
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> .when(header("foo").isEqualTo("bar"))
> >> >>> >>> >>> >> >>>                     .to("direct:b")
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> In my case i have to add more than 80 condition and
> >> >>> >>> >>> >> >>> forwards
> >> >>> >>> >>> >> >>> to 80
> >> >>> >>> >>> >> >>> different queues.
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> Above example i can only hard-code queue name,But
> what
> >> i
> >> >>> >>> >>> >> >>> want
> >> >>> >>> >>> >> >>> is
> >> >>> >>> >>> below.
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> * .when(header("Type").isNotNull())
> >> >>> >>> >>> >> >>>     .to("activemq.Inbound."+header("Type"))
> >> >>> >>> >>> >> >>> *
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> Example:If queue type is test,It should forward to
> >> >>> >>> >>> >> >>> *Inbound.test*
> >> >>> >>> >>> >> queue.
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> Above example i tried,but it did not worked,created
> >> queue
> >> >>> >>> >>> something
> >> >>> >>> >>> >> >>> like this *Inbound.header("type")*
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> *Question2*:
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> from("direct:a")
> >> >>> >>> >>> >> >>>             .multicast().to("direct:b", "direct:c",
> >> >>> >>> >>> >> >>> "direct:d");
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> Based on messages header and content type i want
> >> forward
> >> >>> >>> >>> >> >>> to
> >> >>> >>> >>> different
> >> >>> >>> >>> >> >>> queue.
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> condition will be *OR *and *AND*.How can i do that
> like
> >> >>> >>> >>> >> >>> above
> >> >>> >>> >>> example.*
> >> >>> >>> >>> >> >>> *
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> Thanks in advance*
> >> >>> >>> >>> >> >>> *
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> *Regards*
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> Prabu.N
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via
> >> >>> >>> >>> >> >>> Camel] <
> >> >>> >>> >>> >> >>> [hidden
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> email]<
> >> http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
> >> >>> >>> >>> wrote:
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> > Hi,
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> > you could start by reading Claus´ book (p. 44ff)
> >> which
> >> >>> >>> >>> >> >>> > has a
> >> >>> >>> >>> perfect
> >> >>> >>> >>> >> >>> > example or
> >> >>> >>> >>> >> >>> > http://camel.apache.org/content-based-router.html
> >> >>> >>> >>> >> >>> > (just
> >> >>> >>> >>>
> >> >>> >>> >>> >> >>> > replace the direct: with your queues).
> >> >>> >>> >>> >> >>> > If you need to fire your messages to multiple
> queues:
> >> >>> >>> >>> >> >>> >
> >> http://camel.apache.org/publish-subscribe-channel.html
> >> >>> >>> >>> >> >>> > shows
> >> >>> >>> >>> you the
> >> >>> >>> >>> >> >>> > various ways.
> >> >>> >>> >>> >> >>> > When you get the concepts you can just "lego" them
> >> >>> >>> >>> >> >>> > together.
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> > Regards, Thomas.
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> >> >>> >>> >>> >> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0
> >"
> >> >>> >>> >>> >> >>> > <[hidden email] <
> >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> > > Hi Claus,
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > > Thanks so much Clus for help.It is working now.
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > > I need your guidance for the following
> requirement.
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > > 1.I have one *inbound queue* it will receive
> >> message
> >> >>> >>> >>> frequently
> >> >>> >>> >>> >> from my
> >> >>> >>> >>> >> >>> > > application.
> >> >>> >>> >>> >> >>> > > 2.From *inbound queue* i need camel routing to
> move
> >> >>> >>> >>> >> >>> > > message
> >> >>> >>> >>> from
> >> >>> >>> >>> >> >>> > > another *message
> >> >>> >>> >>> >> >>> > > based inbound queue* based on message header
> value.
> >> >>> >>> >>> >> >>> > > 3.From *message based inbound queue *i* *need
> camel
> >> >>> >>> >>> >> >>> > > routing to
> >> >>> >>> >>> move
> >> >>> >>> >>> >> >>> > message
> >> >>> >>> >>> >> >>> > > to *one or more outbound queue *based on message
> >> >>> >>> >>> >> >>> > > content*
> >> >>> >>> >>> >> >>> > > *
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > > I need *camel java DSL*sample code for above
> >> >>> >>> >>> >> >>> > > requirement.*
> >> >>> >>> >>> >> >>> > > *
> >> >>> >>> >>> >> >>> > > *
> >> >>> >>> >>> >> >>> > > *
> >> >>> >>> >>> >> >>> > > *Thanks in advance*
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2
> [via
> >> >>> >>> >>> >> >>> > > Camel]
> >> >>> >>> >>> >> >>> > > <
> >> >>> >>> >>> >> >>> > > [hidden email] <
> >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> >> >>> >>> >>> >> >>> > wrote:
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > >> Hi
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >> Do as the exception tells you. Check route 2.
> You
> >> >>> >>> >>> >> >>> > >> route
> >> >>> >>> >>> >> >>> > >> from
> >> >>> >>> >>> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know to
> >> >>> >>> >>> >> >>> > >> Camel.
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >> Maybe you need to add "activemq:" as prefix so
> its
> >> >>> >>> >>> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> >> >>> >>> >>> >> >>> >
> http://user/SendEmail.jtp?type=node&node=5730109&i=0
> >> >
> >> >>> >>> >>> >> >>> > >> <[hidden email] <
> >> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> >> >>> >>> >>> >> >>> >>
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> > >> wrote:
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>> I have activemmq  Project in that i have
> >> following
> >> >>> >>> >>> requirement
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>> 1.Move message from Inbound queue to type based
> >> >>> >>> >>> >> >>> > >>> inbound
> >> >>> >>> >>> queue.
> >> >>> >>> >>> >> >>> > >>> 2.Move message from Message type inbound queue
> to
> >> >>> >>> >>> >> >>> > >>> outbound
> >> >>> >>> >>> queue
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>> I have created two bean for to achieve this.
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>> 1.one for move from inbound to message type
> >>  inbound
> >> >>> >>> >>> >> >>> > >>> queue
> >> >>> >>> >>> >> >>> > >>> 2.one for move from inbound to outbound queue.
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>> I have following entry in camel.xml
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>>   <camelContext id="camel" xmlns="
> >> >>> >>> >>> >> >>> > http://camel.apache.org/schema/spring">
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>>                <routeBuilder ref="routeBuilder"
> >> />
> >> >>> >>> >>> >> >>> > >>>            <routeBuilder ref="routeBuilder1" />
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>>    </camelContext>
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder"
> >> >>> >>> >>> >> >>> > >>>
> class="com.camel.routes.SinglecastRouteBuilder"/>
> >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator"
> >> >>> >>> >>> >> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> >> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder1"
> >> >>> >>> >>> >> >>> > >>>
> class="com.camel.routes.MulticastRouteBuilder"/>
> >> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator1"
> >> >>> >>> >>> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>> When i run application i am getting following
> >> error.
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>> * java.lang.Exception:
> >> >>> >>> >>> org.apache.camel.RuntimeCamelException:
> >> >>> >>> >>> >> >>> > >>> org.apache.camel.Fa
> >> >>> >>> >>> >> >>> > >>> iledToCreateRouteException: Failed to create
> >> route
> >> >>> >>> >>> >> >>> > >>> route2:
> >> >>> >>> >>> >> >>> > >>> Route[[From[Inbound.G
> >> >>> >>> >>> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:...
> >> because
> >> >>> >>> >>> >> >>> > >>> of No
> >> >>> >>> >>> endpoint
> >> >>> >>> >>> >> >>> > could
> >> >>> >>> >>> >> >>> > >> be
> >> >>> >>> >>> >> >>> > >>> found
> >> >>> >>> >>> >> >>> > >>> for: Inbound.SSS.TestEvent, please check your
> >> >>> >>> >>> >> >>> > >>> classpath
> >> >>> >>> >>> contains
> >> >>> >>> >>> >> the
> >> >>> >>> >>> >> >>> > >> needed
> >> >>> >>> >>> >> >>> > >>> Cam
> >> >>> >>> >>> >> >>> > >>> el component jar.*
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>> I am not sure i am missing any
> >> configuration,Please
> >> >>> >>> >>> >> >>> > >>> kindly
> >> >>> >>> >>> help
> >> >>> >>> >>> >> me
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>>
> >> >>> >>> >>> >> >>> > >>> --
> >> >>> >>> >>> >> >>> > >>> View this message in context:
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >>
> >> >>> >>> >>> >>
> >> >>> >>> >>> >>
> >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> >> >>> >>> >>> >> >>> > >>> Sent from the Camel - Users mailing list
> archive
> >> at
> >> >>> >>> >>> Nabble.com.
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >> --
> >> >>> >>> >>> >> >>> > >> Claus Ibsen
> >> >>> >>> >>> >> >>> > >> -----------------
> >> >>> >>> >>> >> >>> > >> Red Hat, Inc.
> >> >>> >>> >>> >> >>> > >> FuseSource is now part of Red Hat
> >> >>> >>> >>> >> >>> > >> Email: [hidden email]<
> >> >>> >>> >>> >> >>> >
> http://user/SendEmail.jtp?type=node&node=5730109&i=2
> >> >
> >> >>> >>> >>> >> >>> > >> Web: http://fusesource.com
> >> >>> >>> >>> >> >>> > >> Twitter: davsclaus
> >> >>> >>> >>> >> >>> > >> Blog: http://davsclaus.com
> >> >>> >>> >>> >> >>> > >> Author of Camel in Action:
> >> >>> >>> >>> >> >>> > >> http://www.manning.com/ibsen
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >> ------------------------------
> >> >>> >>> >>> >> >>> > >> If you reply to this email, your message will be
> >> >>> >>> >>> >> >>> > >> added to
> >> >>> >>> >>> >> >>> > >> the
> >> >>> >>> >>> >> >>> > discussion
> >> >>> >>> >>> >> >>> > >> below:
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> > >> .
> >> >>> >>> >>> >> >>> > >> 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
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> > >>
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > > --
> >> >>> >>> >>> >> >>> > > Thanks & Regards
> >> >>> >>> >>> >> >>> > > Prabu.N
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > >
> >> >>> >>> >>> >> >>> > > --
> >> >>> >>> >>> >> >>> > > View this message in context:
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> > > Sent from the Camel - Users mailing list archive
> at
> >> >>> >>> >>> Nabble.com.
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> > ------------------------------
> >> >>> >>> >>> >> >>> >  If you reply to this email, your message will be
> >> added
> >> >>> >>> >>> >> >>> > to
> >> >>> >>> >>> >> >>> > the
> >> >>> >>> >>> >> discussion
> >> >>> >>> >>> >> >>> > below:
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> >> >>> >>> >>> >> >>> >  To unsubscribe from Camel routing issue, 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
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>> >
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> --
> >> >>> >>> >>> >> >>> Thanks & Regards
> >> >>> >>> >>> >> >>>  Prabu.N
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>> --
> >> >>> >>> >>> >> >>> View this message in context:
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> >> >>> >>> >>> >> >>> Sent from the Camel - Users mailing list archive at
> >> >>> >>> >>> >> >>> Nabble.com.
> >> >>> >>> >>> >> >>>
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >> --
> >> >>> >>> >>> >> >> Claus Ibsen
> >> >>> >>> >>> >> >> -----------------
> >> >>> >>> >>> >> >> Red Hat, Inc.
> >> >>> >>> >>> >> >> FuseSource is now part of Red Hat
> >> >>> >>> >>> >> >> Email: [hidden
> >> >>> >>> >>> >> >>
> >> >>> >>> >>> >> >> email]<
> >> http://user/SendEmail.jtp?type=node&node=5730166&i=7>
> >> >>> >>> >>> >> >> Web: http://fusesource.com
> >> >>> >>> >>> >> >> Twitter: davsclaus
> >> >>> >>> >>> >> >> Blog: http://davsclaus.com
> >> >>> >>> >>> >> >> Author of Camel in Action:
> http://www.manning.com/ibsen
> >> >>> >>> >>> >>
> >> >>> >>> >>> >
> >> >>> >>> >>> >
> >> >>> >>> >>> >
> >> >>> >>> >>> > --
> >> >>> >>> >>> > Claus Ibsen
> >> >>> >>> >>> > -----------------
> >> >>> >>> >>> > Red Hat, Inc.
> >> >>> >>> >>> > FuseSource is now part of Red Hat
> >> >>> >>> >>> > Email: [hidden
> >> >>> >>> >>> > email]<
> http://user/SendEmail.jtp?type=node&node=5730166&i=8
> >> >
> >> >>> >>> >>> > Web: http://fusesource.com
> >> >>> >>> >>> > Twitter: davsclaus
> >> >>> >>> >>> > Blog: http://davsclaus.com
> >> >>> >>> >>> > Author of Camel in Action: http://www.manning.com/ibsen
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>> ------------------------------
> >> >>> >>> >>>  If you reply to this email, your message will be added to
> the
> >> >>> >>> >>> discussion below:
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>>
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
> >> >>> >>> >>>  To unsubscribe from Camel routing issue, click
> >> >>> >>> >>>
> >> >>> >>> >>> here<
> >>
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
> >> >
> >> >>> >>> >>> .
> >> >>> >>> >>>
> >> >>> >>> >>>
> >> >>> >>> >>> 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
> >> >
> >> >>> >>> >>>
> >> >>> >>> >>
> >> >>> >>> >>
> >> >>> >>> >>
> >> >>> >>> >> --
> >> >>> >>> >> Thanks & Regards
> >> >>> >>> >>  Prabu.N
> >> >>> >>> >>
> >> >>> >>> >
> >> >>> >>> >
> >> >>> >>> >
> >> >>> >>> > --
> >> >>> >>> > Thanks & Regards
> >> >>> >>> >  Prabu.N
> >> >>> >>> >
> >> >>> >>> >
> >> >>> >>> >
> >> >>> >>> >
> >> >>> >>> > --
> >> >>> >>> > View this message in context:
> >> >>> >>> >
> >> >>> >>> >
> >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
> >> >>> >>> > Sent from the Camel - Users mailing list archive at
> Nabble.com.
> >> >>> >>
> >> >>> >>
> >> >>> >>
> >> >>> >>
> >> >>> >> --
> >> >>> >> Thanks & Regards
> >> >>> >>  Prabu.N
> >> >>> >
> >> >>> >
> >> >>> >
> >> >>> >
> >> >>> > --
> >> >>> > Thanks & Regards
> >> >>> >  Prabu.N
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Thanks & Regards
> >> >>  Prabu.N
> >>
> >
> >
> >
> > --
> > Thanks & Regards
> >  Prabu.N
> >
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730590.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi Chris,

from(CARD_TYPE_SPECIFIC_QNAME).choice()
.when(SCHEDULE_PREDICATE).multicast().to(CARD_QNAME,SCHEDULE_QNAME);
.when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
.otherwise()
.setHeader(PROPERTY_ORIGINAL_DESTINATION,
constant(PROPERTY_ORIGINAL_DESTINATION_VALUE))
.to(ERQ_QNAME)
.end();

When i compile above code i am getting followin

lder.java:115: illegal start of expression
    .when(CARD_EVENT_PREDICATE).to(CARD_EVENT_CARE_HANDLER_QNAME)
              ^

Please kindly help me,i am doing any syntax mistake here

*Regards*
Prabu.N





On Fri, Apr 5, 2013 at 3:58 PM, Prabu <pr...@gmail.com> wrote:

> Thanks Chris/Claus it worked,
>
>
> Hi Chris/Claus,
>
> When running active-mq 5.8 i am getting following issue,do you have any
> idea.
>
> 2013-04-05 05:26:16,312 | WARN  | Async error occurred:
> java.lang.IllegalStateException: Cannot add a consumer to a connection that
> had not been registered:
>
>
> *Regards*
> Prabu.N
>
>
>
>
> On Thu, Apr 4, 2013 at 6:55 PM, Chris Wolf <cw...@gmail.com> wrote:
>
>> 1.) You're NOT using my code - it's still the same as you had before
>> 2.) You're still calling setHeader(java.lang.String, java.lang.String)
>>      even though I tried to tell you that it has to be
>>      setHeader(java.lang.String, org.apache.camel.Expression)
>>
>> On Wed, Apr 3, 2013 at 2:51 PM, Prabu <pr...@gmail.com> wrote:
>> > Please kindly help me...
>> >
>> > On Apr 3, 2013 8:54 PM, "Prabu" <pr...@gmail.com> wrote:
>> >>
>> >> Hi Chris,
>> >>
>> >> I used your code.But i am getting following compilation error
>> >>
>> >> lder.java:92: cannot find symbol
>> >> symbol  : method setHeader(java.lang.String,java.lang.String)
>> >> location: class org.apache.camel.model.ChoiceDefinition
>> >>                   .otherwise().setHeader("MyHeader","sdfsdf")
>> >>
>> >>
>> >> Note: I am using camel 2.10 version
>> >>
>> >>
>> >>
>> >> On Wed, Apr 3, 2013 at 8:22 PM, Chris Wolf <cw...@gmail.com>
>> wrote:
>> >>>
>> >>> Hi Prabu,
>> >>>
>> >>> I don't mind helping, but could you continue to use the
>> >>> users@camel.apache.org rather then my private email?  That way, if
>> >>> other people have similar issues, they can benefit.
>> >>>
>> >>>
>> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
>> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> >>>            .otherwise()
>> >>>            .setHeader("MyHeader", constant("some-value"))  // <=== Set
>> >>> Header
>> >>>            .to(ERQ_QNAME)
>> >>>    .end();
>> >>>
>> >>> This technique will use the "simple" language function "constant" to
>> >>> set a string constant value.
>> >>> If the value you need to set is dynamic, then you could use a
>> >>> property placeholder.
>> >>>
>> >>>     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice(
>> >>>            .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> >>>            .otherwise()
>> >>>            .setHeader("MyHeader", constant("{{some-prop}}"))  // <===
>> Set
>> >>> Header
>> >>>            .to(ERQ_QNAME)
>> >>>    .end();
>> >>>
>> >>> There are even more sophisticated ways to acquire dynamic values:
>> >>>
>> >>> http://camel.apache.org/python.html
>> >>>
>> >>> Regards,
>> >>>
>> >>> Chris
>> >>>
>> >>> On Wed, Apr 3, 2013 at 9:52 AM, Prabu <pr...@gmail.com> wrote:
>> >>> > I have code like this,
>> >>> >
>> >>> >     from(GMD_TEST_TYPE_SPECIFIC_QNAME).choice()
>> >>> >           .when(TEST_EVENT_PREDICATE).to(LOGGING_HANDLER_QNAME)
>> >>> >           .otherwise().to(ERQ_QNAME)
>> >>> >    .end();
>> >>> >
>> >>> >     from(DEACTIVATIN_TYPE_SPECIFIC_QNAME).choice()
>> >>> >
>> >>> > .when(ALERT_FAILURE_HANDLER_PREDICATE).to(ALERT_FAILURE_QNAME)
>> >>> >           .otherwise().to(ERQ_QNAME)
>> >>> >     .end();
>> >>> >
>> >>> > I want to set some values to header inside otherwise that is before
>> >>> > message
>> >>> > move to ERQ_QNAME.
>> >>> >
>> >>> > please kindly help me how to do that.
>> >>> >
>> >>> > Regards
>> >>> > Prabu.N
>> >>> >
>> >>> >
>> >>> > On Tue, Apr 2, 2013 at 10:52 PM, Prabu <pr...@gmail.com>
>> wrote:
>> >>> >>
>> >>> >> No,i didn't received ...
>> >>> >>
>> >>> >> Regards
>> >>> >> Prabu.N
>> >>> >>
>> >>> >>
>> >>> >> On Tue, Apr 2, 2013 at 7:31 PM, Chris Wolf <cw...@gmail.com>
>> >>> >> wrote:
>> >>> >>>
>> >>> >>> Hi Prabu,
>> >>> >>>
>> >>> >>> Just out of curiosity - I am wondering if saw my email I sent
>> >>> >>> yesterday in response to your question?
>> >>> >>> I sent it to "users@camel.apache.org" with the subject,
>> >>> >>> "Content-based routing with Expressions and Predicates"...
>> >>> >>>
>> >>> >>> Regards,
>> >>> >>>
>> >>> >>> Chris
>> >>> >>>
>> >>> >>> On Tue, Apr 2, 2013 at 4:17 AM, prabumca06@gmail.com
>> >>> >>> <pr...@gmail.com> wrote:
>> >>> >>> > I have found solution in internet using Predicate  we can
>> achieve
>> >>> >>> > this,
>> >>> >>> >
>> >>> >>> > But,one doubt in the link
>> >>> >>> > http://camel.apache.org/predicate.html,Theymentioned that we
>> can
>> >>> >>> > use
>> >>> >>> > AND and OR in Predicate
>> >>> >>> >
>> >>> >>> > I have added below code in project,But i am getting compilation
>> >>> >>> > error.Please kindly help
>> >>> >>> >
>> >>> >>> > *Predicate god = and(admin, or(body().contains("Camel Rider"),
>> >>> >>> > header("type").isEqualTo("god")));*
>> >>> >>> >
>> >>> >>> > *Thanks*
>> >>> >>> > Prabu.N
>> >>> >>> >
>> >>> >>> >
>> >>> >>> > On Mon, Apr 1, 2013 at 9:05 PM, Prabu <pr...@gmail.com>
>> wrote:
>> >>> >>> >
>> >>> >>> >> Hi *Chris / **Claus*,
>> >>> >>> >>
>> >>> >>> >> I have one *Inbound* queue,based on header and content type,I
>> want
>> >>> >>> >> forward to outbound queue.
>> >>> >>> >> *
>> >>> >>> >> Example 1:
>> >>> >>> >> *
>> >>> >>> >> *
>> >>> >>> >> Inbound.queue name : **Inbound.Test.DDD
>> >>> >>> >> Outbound.queue name : SOURHQueueName
>> >>> >>> >>
>> >>> >>> >> *
>> >>> >>> >> *Criteria or Condition :
>> >>> >>> >> *
>> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
>> >>> >>> >>    *AND*
>> >>> >>> >> Message *Type* value is : *card.test *or* card.expiry.test*
>> >>> >>> >>
>> >>> >>> >> *Example 2:*
>> >>> >>> >>
>> >>> >>> >> *Inbound.queue name : **Inbound.Test.SSS
>> >>> >>> >> Outbound.queue name : WESTQueueName
>> >>> >>> >> *
>> >>> >>> >> *Criteria or Condition :*
>> >>> >>> >> Message property *PAST_EVENT_INTERVAL type* is : *0*
>> >>> >>> >>  *AND
>> >>> >>> >> *
>> >>> >>> >> Message *Type *value *start with* :*card.event*
>> >>> >>> >>
>> >>> >>> >> I want achieve this using camel routing java DSL.
>> >>> >>> >>
>> >>> >>> >> Please help me.How can i use AND,OR and regular expression in
>> >>> >>> >> camel
>> >>> >>> >> routing
>> >>> >>> >>
>> >>> >>> >> *Regards*
>> >>> >>> >> Prabu.N
>> >>> >>> >>
>> >>> >>> >>
>> >>> >>> >> On Mon, Apr 1, 2013 at 7:43 PM, Chris Wolf [via Camel] <
>> >>> >>> >> ml-node+s465427n5730166h48@n5.nabble.com> wrote:
>> >>> >>> >>
>> >>> >>> >>> Hi Claus,
>> >>> >>> >>>
>> >>> >>> >>> Thanks for the response - I could not see any obvious way to
>> >>> >>> >>> configure
>> >>> >>> >>> an FTP Consumer at ***runtime***,
>> >>> >>> >>> either via bean, processor or consumer template.  If you have
>> a
>> >>> >>> >>> concrete example, that would be great to see...
>> >>> >>> >>>
>> >>> >>> >>> ...otherwise, here's the solution I came up with:
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>     -Chris
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>   // simulate incoming message from JMS...
>> >>> >>> >>>   from("timer:kickoff?repeatCount=1")
>> >>> >>> >>>   .to("direct:start");
>> >>> >>> >>>
>> >>> >>> >>>   // upon receipt of FTP config from JMS, invoke
>>  FtpConfigurer
>> >>> >>> >>> bean
>> >>> >>> >>> to reconfigure
>> >>> >>> >>>   // FTP route, then start it...
>> >>> >>> >>>   from("direct:start")
>> >>> >>> >>>   .beanRef("configRdr") // config reader bean not shown here
>> >>> >>> >>>   .convertBodyTo(Document.class)
>> >>> >>> >>>   // sets a bunch of headers from DOM, e.g.:
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>
>> .setHeader("ftp-config.host").xquery("//remote[remoteId/@value='CBOE34']/server/@value",
>> >>> >>> >>>
>> >>> >>> >>> String.class)
>> >>> >>> >>>   .setHeader("ftp-route-id", constant("ftp.route"))
>> >>> >>> >>>   .beanRef("ftpConfigurer");
>> >>> >>> >>>
>> >>> >>> >>>   // FTP route will only be started by FtpConfigurer bean
>> after
>> >>> >>> >>> it's
>> >>> >>> >>> dynamically re-configured...
>> >>> >>> >>>   from("ftp://bogushost/bogusdir?startScheduler=false") //
>> the
>> >>> >>> >>> URI
>> >>> >>> >>> will be reconfigured...
>> >>> >>> >>>   .routeId("ftp.route").noAutoStartup()
>> >>> >>> >>>   .log("Received file ${file:onlyname}")
>> >>> >>> >>>   .to("file:/tmp/local/data");
>> >>> >>> >>>
>> >>> >>> >>>   public class FtpConfigurer {
>> >>> >>> >>>     public void configureFtpConsumer(Exchange exchange) throws
>> >>> >>> >>> Exception
>> >>> >>> >>> {
>> >>> >>> >>>         CamelContext context = exchange.getContext();
>> >>> >>> >>>         Map<String, Object> headers =
>> >>> >>> >>> exchange.getIn().getHeaders();
>> >>> >>> >>>         Map<String, Object> parameters = new HashMap<String,
>> >>> >>> >>> Object>();
>> >>> >>> >>>
>> >>> >>> >>>         // Filter headers for ftp-config specific headers...
>> >>> >>> >>>         for (Map.Entry<String, Object> entry :
>> >>> >>> >>> headers.entrySet()) {
>> >>> >>> >>>             String key = entry.getKey();
>> >>> >>> >>>             if (key.startsWith("ftp-config."))
>> >>> >>> >>>
>> >>> >>> >>> parameters.put(key.substring("ftp-config.".length()),
>> >>> >>> >>> entry.getValue());
>> >>> >>> >>>         }
>> >>> >>> >>>
>> >>> >>> >>>         String routeId =
>> >>> >>> >>> exchange.getIn().getHeader("ftp-route-id",
>> >>> >>> >>> String.class);
>> >>> >>> >>>         Route ftpRoute = context.getRoute(routeId);
>> >>> >>> >>>         FtpConsumer c = (FtpConsumer) ftpRoute.getConsumer();
>> >>> >>> >>>         FtpEndpoint<FTPFile> rfe = (FtpEndpoint<FTPFile>)
>> >>> >>> >>> c.getEndpoint();
>> >>> >>> >>>         FtpConfiguration rfc = rfe.getConfiguration();
>> >>> >>> >>>
>> >>> >>> >>>         // Need to crack open FtpConsumer's "endpointPath"
>> field
>> >>> >>> >>> since
>> >>> >>> >>>         // there's no mutator (setter)
>> >>> >>> >>>         Class<?> cls = c.getClass();
>> >>> >>> >>>         Field endpointPath_fld =
>> >>> >>> >>> cls.getDeclaredField("endpointPath");
>> >>> >>> >>>         endpointPath_fld.setAccessible(true);
>> >>> >>> >>>         endpointPath_fld.set(c,
>> >>> >>> >>> (String)parameters.get("directory"));
>> >>> >>> >>>
>> >>> >>> >>>         // Need to crack open FtpEndpoint, actually
>> >>> >>> >>> DefaultEndpoint -
>> >>> >>> >>> the ultimate base class
>> >>> >>> >>>         // since there's no mutator (setter) for the
>> >>> >>> >>> "endpointUri"
>> >>> >>> >>> field
>> >>> >>> >>>         cls = rfe.getClass();
>> >>> >>> >>>         Field endpointUri_fld = null;
>> >>> >>> >>>         while (endpointUri_fld == null) {
>> >>> >>> >>>             // TODO: maybe change logic to just stop at
>> >>> >>> >>> class=DefaultEndpoint
>> >>> >>> >>>             // rather then using NoSuchFieldException
>> >>> >>> >>>             try {
>> >>> >>> >>>                 endpointUri_fld =
>> >>> >>> >>> cls.getDeclaredField("endpointUri");
>> >>> >>> >>>             } catch (NoSuchFieldException nsfe) {
>> >>> >>> >>>                 cls = cls.getSuperclass();
>> >>> >>> >>>             }
>> >>> >>> >>>         }
>> >>> >>> >>>         endpointUri_fld.setAccessible(true);
>> >>> >>> >>>         endpointUri_fld.set(rfe,
>> >>> >>> >>>             String.format("ftp://%s/%s",
>> >>> >>> >>> (String)parameters.get("host"),
>> >>> >>> >>> (String)parameters.get("directory")));
>> >>> >>> >>>
>> >>> >>> >>>         // set reference properties first as they use # syntax
>> >>> >>> >>> that
>> >>> >>> >>> fools the regular properties setter
>> >>> >>> >>>         EndpointHelper.setReferenceProperties(context, rfc,
>> >>> >>> >>> parameters);
>> >>> >>> >>>         EndpointHelper.setProperties(context, rfc,
>> parameters);
>> >>> >>> >>>         EndpointHelper.setReferenceProperties(context, rfe,
>> >>> >>> >>> parameters);
>> >>> >>> >>>         EndpointHelper.setProperties(context, rfe,
>> parameters);
>> >>> >>> >>>         c.setStartScheduler(true);
>> >>> >>> >>>
>> >>> >>> >>>         context.startRoute(routeId);
>> >>> >>> >>>   }
>> >>> >>> >>> }
>> >>> >>> >>>
>> >>> >>> >>> On Mon, Apr 1, 2013 at 4:32 AM, Claus Ibsen <[hidden
>> >>> >>> >>> email]<http://user/SendEmail.jtp?type=node&node=5730166&i=0>>
>> >>> >>> >>> wrote:
>> >>> >>> >>>
>> >>> >>> >>> > Hi
>> >>> >>> >>> >
>> >>> >>> >>> > See this EIP
>> >>> >>> >>> > http://camel.apache.org/content-enricher.html
>> >>> >>> >>> >
>> >>> >>> >>> > About pollEnrich.
>> >>> >>> >>> >
>> >>> >>> >>> > Though pollEnrich currently does support dynamic uris. Its
>> on
>> >>> >>> >>> > the
>> >>> >>> >>> roadmap,
>> >>> >>> >>> > for Camel 3.0.
>> >>> >>> >>> > It requires an API change and thus isn't so easy to
>> implement
>> >>> >>> >>> > currently
>> >>> >>> >>> on
>> >>> >>> >>> > 2.x.
>> >>> >>> >>> >
>> >>> >>> >>> > You can always use a java bean / camel processor, and
>> consume
>> >>> >>> >>> > the
>> >>> >>> >>> > ftp
>> >>> >>> >>> file
>> >>> >>> >>> > from java code.
>> >>> >>> >>> > For example using consumer template.
>> >>> >>> >>> >
>> >>> >>> >>> > As you use FTP you may want to set disconnect=true so the
>> >>> >>> >>> > connect
>> >>> >>> >>> > is
>> >>> >>> >>> not
>> >>> >>> >>> > remained open after usage.
>> >>> >>> >>> >
>> >>> >>> >>> >
>> >>> >>> >>> >
>> >>> >>> >>> > On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden
>> >>> >>> >>> > email]<http://user/SendEmail.jtp?type=node&node=5730166&i=1
>> >>
>> >>> >>> >>> wrote:
>> >>> >>> >>> >
>> >>> >>> >>> >> Ok, I'm starting to get it - a little bit.  As for my
>> concrete
>> >>> >>> >>> >> example, so far, I have:
>> >>> >>> >>> >>
>> >>> >>> >>> >>                 from("direct:start")
>> >>> >>> >>> >>                 .beanRef("config")
>> >>> >>> >>> >>                 .convertBodyTo(Document.class)
>> >>> >>> >>> >>                 .recipientList().xquery(
>> >>> >>> >>> >>                     "concat('ftp://'" +
>> >>> >>> >>> >>
>> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/server/@value" +
>> >>> >>> >>> >>
>> >>> >>> >>> >>
>> >>> >>> >>> >>
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>
>> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>> >>> >>> >>>
>> >>> >>> >>> >> +
>> >>> >>> >>> >>                     ",'?noop=true&amp;username='" +
>> >>> >>> >>> >>
>> >>> >>> >>> ",//remote[vendorId/@value='CBOE34']/username/@value" +
>> >>> >>> >>> >>                     ",'&amp;password='" +
>> >>> >>> >>> >>
>> >>> >>> >>> >> ",//remote[vendorId/@value='CBOE34']/password/@value)",
>> >>> >>> >>> >> String.class);
>> >>> >>> >>> >>
>> >>> >>> >>> >> Here's the problem - this will create an FTP Producer -
>> that's
>> >>> >>> >>> >> not
>> >>> >>> >>> >> what I need.  I need a dynamically
>> >>> >>> >>> >> constructed URI for a polling FTP consumer.  I don't think
>> >>> >>> >>> >> "recipientList" will work...   Any ideas?
>> >>> >>> >>> >>
>> >>> >>> >>> >> Thanks,
>> >>> >>> >>> >>
>> >>> >>> >>> >> Chris
>> >>> >>> >>> >>
>> >>> >>> >>> >> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden
>> >>> >>> >>> >> email]<
>> http://user/SendEmail.jtp?type=node&node=5730166&i=2>>
>> >>> >>> >>> wrote:
>> >>> >>> >>> >> > Hi Claus,
>> >>> >>> >>> >> >
>> >>> >>> >>> >> > I hate to ask this - but I still don't get it.  I thought
>> >>> >>> >>> >> > "recipientList" was for sending to multiple,
>> runtime-defined
>> >>> >>> >>> >> > recipients.  I don't see how this
>> >>> >>> >>> >> > answers the question of sending to one, single recipient,
>> >>> >>> >>> >> > whose
>> >>> >>> >>> >> > URI
>> >>> >>> >>> is
>> >>> >>> >>> >> > dynamically constructed - and in my use-case the dynamic
>> >>> >>> >>> >> > settings
>> >>> >>> >>> >> > are not in properties - so "simple" (property
>> place-holders)
>> >>> >>> >>> >> > won't
>> >>> >>> >>> help
>> >>> >>> >>> >> me.
>> >>> >>> >>> >> >
>> >>> >>> >>> >> > Let me give you a concrete example.  I need to do an ftp
>> >>> >>> >>> >> > download
>> >>> >>> >>> and
>> >>> >>> >>> >> > the connection information comes from up-stream in the
>> route
>> >>> >>> >>> >> > in
>> >>> >>> >>> >> > the
>> >>> >>> >>> >> > form of XML (DOM - a Document instance).  Currently, I am
>> >>> >>> >>> >> > trying
>> >>> >>> >>> >> > to
>> >>> >>> >>> do
>> >>> >>> >>> >> > this with bean binding and method params decorated with
>> >>> >>> >>> >> > @XPath
>> >>> >>> >>> >> > pointing into the Document with the ftp settings and
>> inside
>> >>> >>> >>> >> > the
>> >>> >>> >>> >> > this method doing:
>> >>> >>> >>> >> >
>> >>> >>> >>> >> > FtpComponent ftpComponent = context.getComponent("ftp",
>> >>> >>> >>> >> FtpComponent.class);
>> >>> >>> >>> >> >
>> >>> >>> >>> >> > ..and then attempt to get the endpoint and call
>> >>> >>> >>> >> > createConsumer(...).
>> >>> >>> >>> >> > I'm sure this is not the right way to do it, but I don't
>> see
>> >>> >>> >>> >> > how
>> >>> >>> >>> else
>> >>> >>> >>> >> > - any ideas?
>> >>> >>> >>> >> >
>> >>> >>> >>> >> > Thanks,
>> >>> >>> >>> >> >
>> >>> >>> >>> >> >
>> >>> >>> >>> >> > Chris
>> >>> >>> >>> >> >
>> >>> >>> >>> >> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden
>> >>> >>> >>> >> >
>> >>> >>> >>> >> > email]<
>> http://user/SendEmail.jtp?type=node&node=5730166&i=3>>
>> >>> >>> >>>
>> >>> >>> >>> >> wrote:
>> >>> >>> >>> >> >> Hi
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >> See this FAQ
>> >>> >>> >>> >> >>
>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >> email]<
>> http://user/SendEmail.jtp?type=node&node=5730166&i=4>
>> >>> >>> >>> >> >> <[hidden
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >> email]<
>> http://user/SendEmail.jtp?type=node&node=5730166&i=5>>wrote:
>> >>> >>> >>>
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >>> Thanks Walzer..
>> >>> >>> >>> >> >>> *
>> >>> >>> >>> >> >>> *
>> >>> >>> >>> >> >>> *Queston1:
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> *
>> >>> >>> >>> >> >>> *Example*
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> .when(header("foo").isEqualTo("bar"))
>> >>> >>> >>> >> >>>                     .to("direct:b")
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> In my case i have to add more than 80 condition and
>> >>> >>> >>> >> >>> forwards
>> >>> >>> >>> >> >>> to 80
>> >>> >>> >>> >> >>> different queues.
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> Above example i can only hard-code queue name,But what
>> i
>> >>> >>> >>> >> >>> want
>> >>> >>> >>> >> >>> is
>> >>> >>> >>> below.
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> * .when(header("Type").isNotNull())
>> >>> >>> >>> >> >>>     .to("activemq.Inbound."+header("Type"))
>> >>> >>> >>> >> >>> *
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> Example:If queue type is test,It should forward to
>> >>> >>> >>> >> >>> *Inbound.test*
>> >>> >>> >>> >> queue.
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> Above example i tried,but it did not worked,created
>> queue
>> >>> >>> >>> something
>> >>> >>> >>> >> >>> like this *Inbound.header("type")*
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> *Question2*:
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> from("direct:a")
>> >>> >>> >>> >> >>>             .multicast().to("direct:b", "direct:c",
>> >>> >>> >>> >> >>> "direct:d");
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> Based on messages header and content type i want
>> forward
>> >>> >>> >>> >> >>> to
>> >>> >>> >>> different
>> >>> >>> >>> >> >>> queue.
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> condition will be *OR *and *AND*.How can i do that like
>> >>> >>> >>> >> >>> above
>> >>> >>> >>> example.*
>> >>> >>> >>> >> >>> *
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> Thanks in advance*
>> >>> >>> >>> >> >>> *
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> *Regards*
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> Prabu.N
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via
>> >>> >>> >>> >> >>> Camel] <
>> >>> >>> >>> >> >>> [hidden
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> email]<
>> http://user/SendEmail.jtp?type=node&node=5730166&i=6>>
>> >>> >>> >>> wrote:
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> > Hi,
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> > you could start by reading Claus´ book (p. 44ff)
>> which
>> >>> >>> >>> >> >>> > has a
>> >>> >>> >>> perfect
>> >>> >>> >>> >> >>> > example or
>> >>> >>> >>> >> >>> > http://camel.apache.org/content-based-router.html
>> >>> >>> >>> >> >>> > (just
>> >>> >>> >>>
>> >>> >>> >>> >> >>> > replace the direct: with your queues).
>> >>> >>> >>> >> >>> > If you need to fire your messages to multiple queues:
>> >>> >>> >>> >> >>> >
>> http://camel.apache.org/publish-subscribe-channel.html
>> >>> >>> >>> >> >>> > shows
>> >>> >>> >>> you the
>> >>> >>> >>> >> >>> > various ways.
>> >>> >>> >>> >> >>> > When you get the concepts you can just "lego" them
>> >>> >>> >>> >> >>> > together.
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> > Regards, Thomas.
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>> >>> >>> >>> >> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
>> >>> >>> >>> >> >>> > <[hidden email] <
>> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> > > Hi Claus,
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > > Thanks so much Clus for help.It is working now.
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > > I need your guidance for the following requirement.
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > > 1.I have one *inbound queue* it will receive
>> message
>> >>> >>> >>> frequently
>> >>> >>> >>> >> from my
>> >>> >>> >>> >> >>> > > application.
>> >>> >>> >>> >> >>> > > 2.From *inbound queue* i need camel routing to move
>> >>> >>> >>> >> >>> > > message
>> >>> >>> >>> from
>> >>> >>> >>> >> >>> > > another *message
>> >>> >>> >>> >> >>> > > based inbound queue* based on message header value.
>> >>> >>> >>> >> >>> > > 3.From *message based inbound queue *i* *need camel
>> >>> >>> >>> >> >>> > > routing to
>> >>> >>> >>> move
>> >>> >>> >>> >> >>> > message
>> >>> >>> >>> >> >>> > > to *one or more outbound queue *based on message
>> >>> >>> >>> >> >>> > > content*
>> >>> >>> >>> >> >>> > > *
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > > I need *camel java DSL*sample code for above
>> >>> >>> >>> >> >>> > > requirement.*
>> >>> >>> >>> >> >>> > > *
>> >>> >>> >>> >> >>> > > *
>> >>> >>> >>> >> >>> > > *
>> >>> >>> >>> >> >>> > > *Thanks in advance*
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via
>> >>> >>> >>> >> >>> > > Camel]
>> >>> >>> >>> >> >>> > > <
>> >>> >>> >>> >> >>> > > [hidden email] <
>> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>> >>> >>> >>> >> >>> > wrote:
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > >> Hi
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >> Do as the exception tells you. Check route 2. You
>> >>> >>> >>> >> >>> > >> route
>> >>> >>> >>> >> >>> > >> from
>> >>> >>> >>> >> >>> > >> "Inbound.SSS.TestEvent". And that is now know to
>> >>> >>> >>> >> >>> > >> Camel.
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >> Maybe you need to add "activemq:" as prefix so its
>> >>> >>> >>> >> >>> > >> "activemq:Inbound.SSS.TestEvent".
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
>> >>> >>> >>> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0
>> >
>> >>> >>> >>> >> >>> > >> <[hidden email] <
>> >>> >>> >>> >> http://user/SendEmail.jtp?type=node&node=5730109&i=1
>> >>> >>> >>> >> >>> >>
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> > >> wrote:
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>> I have activemmq  Project in that i have
>> following
>> >>> >>> >>> requirement
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>> 1.Move message from Inbound queue to type based
>> >>> >>> >>> >> >>> > >>> inbound
>> >>> >>> >>> queue.
>> >>> >>> >>> >> >>> > >>> 2.Move message from Message type inbound queue to
>> >>> >>> >>> >> >>> > >>> outbound
>> >>> >>> >>> queue
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>> I have created two bean for to achieve this.
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>> 1.one for move from inbound to message type
>>  inbound
>> >>> >>> >>> >> >>> > >>> queue
>> >>> >>> >>> >> >>> > >>> 2.one for move from inbound to outbound queue.
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>> I have following entry in camel.xml
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>>   <camelContext id="camel" xmlns="
>> >>> >>> >>> >> >>> > http://camel.apache.org/schema/spring">
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>>                <routeBuilder ref="routeBuilder"
>> />
>> >>> >>> >>> >> >>> > >>>            <routeBuilder ref="routeBuilder1" />
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>>    </camelContext>
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder"
>> >>> >>> >>> >> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
>> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator"
>> >>> >>> >>> >> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
>> >>> >>> >>> >> >>> > >>>    <bean id="routeBuilder1"
>> >>> >>> >>> >> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
>> >>> >>> >>> >> >>> > >>>    <bean id="recipientsGenerator1"
>> >>> >>> >>> >> >>> > >>> class="com.camel.routes.RecipientListBean"/>
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>> When i run application i am getting following
>> error.
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>> * java.lang.Exception:
>> >>> >>> >>> org.apache.camel.RuntimeCamelException:
>> >>> >>> >>> >> >>> > >>> org.apache.camel.Fa
>> >>> >>> >>> >> >>> > >>> iledToCreateRouteException: Failed to create
>> route
>> >>> >>> >>> >> >>> > >>> route2:
>> >>> >>> >>> >> >>> > >>> Route[[From[Inbound.G
>> >>> >>> >>> >> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:...
>> because
>> >>> >>> >>> >> >>> > >>> of No
>> >>> >>> >>> endpoint
>> >>> >>> >>> >> >>> > could
>> >>> >>> >>> >> >>> > >> be
>> >>> >>> >>> >> >>> > >>> found
>> >>> >>> >>> >> >>> > >>> for: Inbound.SSS.TestEvent, please check your
>> >>> >>> >>> >> >>> > >>> classpath
>> >>> >>> >>> contains
>> >>> >>> >>> >> the
>> >>> >>> >>> >> >>> > >> needed
>> >>> >>> >>> >> >>> > >>> Cam
>> >>> >>> >>> >> >>> > >>> el component jar.*
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>> I am not sure i am missing any
>> configuration,Please
>> >>> >>> >>> >> >>> > >>> kindly
>> >>> >>> >>> help
>> >>> >>> >>> >> me
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>>
>> >>> >>> >>> >> >>> > >>> --
>> >>> >>> >>> >> >>> > >>> View this message in context:
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >>
>> >>> >>> >>> >>
>> >>> >>> >>> >>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>> >>> >>> >>> >> >>> > >>> Sent from the Camel - Users mailing list archive
>> at
>> >>> >>> >>> Nabble.com.
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >> --
>> >>> >>> >>> >> >>> > >> Claus Ibsen
>> >>> >>> >>> >> >>> > >> -----------------
>> >>> >>> >>> >> >>> > >> Red Hat, Inc.
>> >>> >>> >>> >> >>> > >> FuseSource is now part of Red Hat
>> >>> >>> >>> >> >>> > >> Email: [hidden email]<
>> >>> >>> >>> >> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2
>> >
>> >>> >>> >>> >> >>> > >> Web: http://fusesource.com
>> >>> >>> >>> >> >>> > >> Twitter: davsclaus
>> >>> >>> >>> >> >>> > >> Blog: http://davsclaus.com
>> >>> >>> >>> >> >>> > >> Author of Camel in Action:
>> >>> >>> >>> >> >>> > >> http://www.manning.com/ibsen
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >> ------------------------------
>> >>> >>> >>> >> >>> > >> If you reply to this email, your message will be
>> >>> >>> >>> >> >>> > >> added to
>> >>> >>> >>> >> >>> > >> the
>> >>> >>> >>> >> >>> > discussion
>> >>> >>> >>> >> >>> > >> below:
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> > >> .
>> >>> >>> >>> >> >>> > >> 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
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> > >>
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > > --
>> >>> >>> >>> >> >>> > > Thanks & Regards
>> >>> >>> >>> >> >>> > > Prabu.N
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > >
>> >>> >>> >>> >> >>> > > --
>> >>> >>> >>> >> >>> > > View this message in context:
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >>
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> > > Sent from the Camel - Users mailing list archive at
>> >>> >>> >>> Nabble.com.
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> > ------------------------------
>> >>> >>> >>> >> >>> >  If you reply to this email, your message will be
>> added
>> >>> >>> >>> >> >>> > to
>> >>> >>> >>> >> >>> > the
>> >>> >>> >>> >> discussion
>> >>> >>> >>> >> >>> > below:
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >>
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>> >>> >>> >>> >> >>> >  To unsubscribe from Camel routing issue, 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
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>> >
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> --
>> >>> >>> >>> >> >>> Thanks & Regards
>> >>> >>> >>> >> >>>  Prabu.N
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>> --
>> >>> >>> >>> >> >>> View this message in context:
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >>
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>> >>> >>> >>> >> >>> Sent from the Camel - Users mailing list archive at
>> >>> >>> >>> >> >>> Nabble.com.
>> >>> >>> >>> >> >>>
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >> --
>> >>> >>> >>> >> >> Claus Ibsen
>> >>> >>> >>> >> >> -----------------
>> >>> >>> >>> >> >> Red Hat, Inc.
>> >>> >>> >>> >> >> FuseSource is now part of Red Hat
>> >>> >>> >>> >> >> Email: [hidden
>> >>> >>> >>> >> >>
>> >>> >>> >>> >> >> email]<
>> http://user/SendEmail.jtp?type=node&node=5730166&i=7>
>> >>> >>> >>> >> >> Web: http://fusesource.com
>> >>> >>> >>> >> >> Twitter: davsclaus
>> >>> >>> >>> >> >> Blog: http://davsclaus.com
>> >>> >>> >>> >> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >>> >>> >>> >>
>> >>> >>> >>> >
>> >>> >>> >>> >
>> >>> >>> >>> >
>> >>> >>> >>> > --
>> >>> >>> >>> > Claus Ibsen
>> >>> >>> >>> > -----------------
>> >>> >>> >>> > Red Hat, Inc.
>> >>> >>> >>> > FuseSource is now part of Red Hat
>> >>> >>> >>> > Email: [hidden
>> >>> >>> >>> > email]<http://user/SendEmail.jtp?type=node&node=5730166&i=8
>> >
>> >>> >>> >>> > Web: http://fusesource.com
>> >>> >>> >>> > Twitter: davsclaus
>> >>> >>> >>> > Blog: http://davsclaus.com
>> >>> >>> >>> > Author of Camel in Action: http://www.manning.com/ibsen
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>> ------------------------------
>> >>> >>> >>>  If you reply to this email, your message will be added to the
>> >>> >>> >>> discussion below:
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730166.html
>> >>> >>> >>>  To unsubscribe from Camel routing issue, click
>> >>> >>> >>>
>> >>> >>> >>> here<
>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
>> >
>> >>> >>> >>> .
>> >>> >>> >>>
>> >>> >>> >>>
>> >>> >>> >>> 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
>> >
>> >>> >>> >>>
>> >>> >>> >>
>> >>> >>> >>
>> >>> >>> >>
>> >>> >>> >> --
>> >>> >>> >> Thanks & Regards
>> >>> >>> >>  Prabu.N
>> >>> >>> >>
>> >>> >>> >
>> >>> >>> >
>> >>> >>> >
>> >>> >>> > --
>> >>> >>> > Thanks & Regards
>> >>> >>> >  Prabu.N
>> >>> >>> >
>> >>> >>> >
>> >>> >>> >
>> >>> >>> >
>> >>> >>> > --
>> >>> >>> > View this message in context:
>> >>> >>> >
>> >>> >>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730194.html
>> >>> >>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> --
>> >>> >> Thanks & Regards
>> >>> >>  Prabu.N
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > --
>> >>> > Thanks & Regards
>> >>> >  Prabu.N
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Thanks & Regards
>> >>  Prabu.N
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730590.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Like Chris suggest i tried below way


 .when(header("TYPE").isNotNull())
               .to("activemq:queue.Inbound.${header.Type}")


But queue created *${header.Type}* like this not *Inbound.test*

Please kindly give me example.

*Regards*
Prabu.N



On Mon, Apr 1, 2013 at 2:03 PM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5730152h14@n5.nabble.com> wrote:

> Hi
>
> See this EIP
> http://camel.apache.org/content-enricher.html
>
> About pollEnrich.
>
> Though pollEnrich currently does support dynamic uris. Its on the roadmap,
> for Camel 3.0.
> It requires an API change and thus isn't so easy to implement currently on
> 2.x.
>
> You can always use a java bean / camel processor, and consume the ftp file
> from java code.
> For example using consumer template.
>
> As you use FTP you may want to set disconnect=true so the connect is not
> remained open after usage.
>
>
>
> On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=0>>
> wrote:
>
> > Ok, I'm starting to get it - a little bit.  As for my concrete
> > example, so far, I have:
> >
> >                 from("direct:start")
> >                 .beanRef("config")
> >                 .convertBodyTo(Document.class)
> >                 .recipientList().xquery(
> >                     "concat('ftp://'" +
> >                     ",//remote[vendorId/@value='CBOE34']/server/@value"
> +
> >
> >
> >
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
>
> > +
> >                     ",'?noop=true&amp;username='" +
> >
> ",//remote[vendorId/@value='CBOE34']/username/@value" +
> >                     ",'&amp;password='" +
> >
> > ",//remote[vendorId/@value='CBOE34']/password/@value)", String.class);
> >
> > Here's the problem - this will create an FTP Producer - that's not
> > what I need.  I need a dynamically
> > constructed URI for a polling FTP consumer.  I don't think
> > "recipientList" will work...   Any ideas?
> >
> > Thanks,
> >
> > Chris
> >
> > On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=1>>
> wrote:
> > > Hi Claus,
> > >
> > > I hate to ask this - but I still don't get it.  I thought
> > > "recipientList" was for sending to multiple, runtime-defined
> > > recipients.  I don't see how this
> > > answers the question of sending to one, single recipient, whose URI is
> > > dynamically constructed - and in my use-case the dynamic settings
> > > are not in properties - so "simple" (property place-holders) won't
> help
> > me.
> > >
> > > Let me give you a concrete example.  I need to do an ftp download and
> > > the connection information comes from up-stream in the route in the
> > > form of XML (DOM - a Document instance).  Currently, I am trying to do
> > > this with bean binding and method params decorated with @XPath
> > > pointing into the Document with the ftp settings and inside the
> > > this method doing:
> > >
> > > FtpComponent ftpComponent = context.getComponent("ftp",
> > FtpComponent.class);
> > >
> > > ..and then attempt to get the endpoint and call createConsumer(...).
> > > I'm sure this is not the right way to do it, but I don't see how else
> > > - any ideas?
> > >
> > > Thanks,
> > >
> > >
> > > Chris
> > >
> > > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=2>>
>
> > wrote:
> > >> Hi
> > >>
> > >> See this FAQ
> > >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> > >>
> > >>
> > >>
> > >>
> > >> On Sun, Mar 31, 2013 at 5:22 AM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=3>
> > >> <[hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=4>>wrote:
>
> > >>
> > >>> Thanks Walzer..
> > >>> *
> > >>> *
> > >>> *Queston1:
> > >>>
> > >>> *
> > >>> *Example*
> > >>>
> > >>> .when(header("foo").isEqualTo("bar"))
> > >>>                     .to("direct:b")
> > >>>
> > >>> In my case i have to add more than 80 condition and forwards to 80
> > >>> different queues.
> > >>>
> > >>> Above example i can only hard-code queue name,But what i want is
> below.
> > >>>
> > >>> * .when(header("Type").isNotNull())
> > >>>     .to("activemq.Inbound."+header("Type"))
> > >>> *
> > >>>
> > >>> Example:If queue type is test,It should forward to *Inbound.test*
> > queue.
> > >>>
> > >>> Above example i tried,but it did not worked,created queue something
> > >>> like this *Inbound.header("type")*
> > >>>
> > >>> *Question2*:
> > >>>
> > >>> from("direct:a")
> > >>>             .multicast().to("direct:b", "direct:c", "direct:d");
> > >>>
> > >>> Based on messages header and content type i want forward to
> different
> > >>> queue.
> > >>>
> > >>> condition will be *OR *and *AND*.How can i do that like above
> example.*
> > >>> *
> > >>>
> > >>> Thanks in advance*
> > >>> *
> > >>>
> > >>> *Regards*
> > >>>
> > >>> Prabu.N
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
> > >>> [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=5>>
> wrote:
> > >>>
> > >>> > Hi,
> > >>> >
> > >>> > you could start by reading Claus´ book (p. 44ff) which has a
> perfect
> > >>> > example or http://camel.apache.org/content-based-router.html (just
>
> > >>> > replace the direct: with your queues).
> > >>> > If you need to fire your messages to multiple queues:
> > >>> > http://camel.apache.org/publish-subscribe-channel.html shows you
> the
> > >>> > various ways.
> > >>> > When you get the concepts you can just "lego" them together.
> > >>> >
> > >>> > Regards, Thomas.
> > >>> >
> > >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> > >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> > >>> > <[hidden email] <
> > http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> > >>> >
> > >>> > > Hi Claus,
> > >>> > >
> > >>> > > Thanks so much Clus for help.It is working now.
> > >>> > >
> > >>> > > I need your guidance for the following requirement.
> > >>> > >
> > >>> > > 1.I have one *inbound queue* it will receive message frequently
> > from my
> > >>> > > application.
> > >>> > > 2.From *inbound queue* i need camel routing to move message from
> > >>> > > another *message
> > >>> > > based inbound queue* based on message header value.
> > >>> > > 3.From *message based inbound queue *i* *need camel routing to
> move
> > >>> > message
> > >>> > > to *one or more outbound queue *based on message content*
> > >>> > > *
> > >>> > >
> > >>> > > I need *camel java DSL*sample code for above requirement.*
> > >>> > > *
> > >>> > > *
> > >>> > > *
> > >>> > > *Thanks in advance*
> > >>> > >
> > >>> > >
> > >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
> > >>> > > [hidden email] <
> > http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> > >>> > wrote:
> > >>> > >
> > >>> > >> Hi
> > >>> > >>
> > >>> > >> Do as the exception tells you. Check route 2. You route from
> > >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
> > >>> > >>
> > >>> > >> Maybe you need to add "activemq:" as prefix so its
> > >>> > >> "activemq:Inbound.SSS.TestEvent".
> > >>> > >>
> > >>> > >>
> > >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> > >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> > >>> > >> <[hidden email] <
> > http://user/SendEmail.jtp?type=node&node=5730109&i=1
> > >>> >>
> > >>> >
> > >>> > >> wrote:
> > >>> > >>
> > >>> > >>>
> > >>> > >>> I have activemmq  Project in that i have following requirement
> > >>> > >>>
> > >>> > >>> 1.Move message from Inbound queue to type based inbound queue.
> > >>> > >>> 2.Move message from Message type inbound queue to outbound
> queue
> > >>> > >>>
> > >>> > >>> I have created two bean for to achieve this.
> > >>> > >>>
> > >>> > >>> 1.one for move from inbound to message type  inbound queue
> > >>> > >>> 2.one for move from inbound to outbound queue.
> > >>> > >>>
> > >>> > >>> I have following entry in camel.xml
> > >>> > >>>
> > >>> > >>>   <camelContext id="camel" xmlns="
> > >>> > http://camel.apache.org/schema/spring">
> > >>> > >>
> > >>> > >>>
> > >>> > >>>                <routeBuilder ref="routeBuilder" />
> > >>> > >>>            <routeBuilder ref="routeBuilder1" />
> > >>> > >>>
> > >>> > >>>    </camelContext>
> > >>> > >>>
> > >>> > >>>    <bean id="routeBuilder"
> > >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> > >>> > >>>    <bean id="recipientsGenerator"
> > >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> > >>> > >>>    <bean id="routeBuilder1"
> > >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
> > >>> > >>>    <bean id="recipientsGenerator1"
> > >>> > >>> class="com.camel.routes.RecipientListBean"/>
> > >>> > >>>
> > >>> > >>> When i run application i am getting following error.
> > >>> > >>>
> > >>> > >>> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
> > >>> > >>> org.apache.camel.Fa
> > >>> > >>> iledToCreateRouteException: Failed to create route route2:
> > >>> > >>> Route[[From[Inbound.G
> > >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No
> endpoint
> > >>> > could
> > >>> > >> be
> > >>> > >>> found
> > >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath
> contains
> > the
> > >>> > >> needed
> > >>> > >>> Cam
> > >>> > >>> el component jar.*
> > >>> > >>>
> > >>> > >>> I am not sure i am missing any configuration,Please kindly
> help
> > me
> > >>> > >>>
> > >>> > >>>
> > >>> > >>>
> > >>> > >>>
> > >>> > >>> --
> > >>> > >>> View this message in context:
> > >>> > >>
> > http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> > >>> > >>> Sent from the Camel - Users mailing list archive at
> Nabble.com.
> > >>> > >>
> > >>> > >>
> > >>> > >>
> > >>> > >> --
> > >>> > >> Claus Ibsen
> > >>> > >> -----------------
> > >>> > >> Red Hat, Inc.
> > >>> > >> FuseSource is now part of Red Hat
> > >>> > >> Email: [hidden email]<
> > >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> > >>> > >> Web: http://fusesource.com
> > >>> > >> Twitter: davsclaus
> > >>> > >> Blog: http://davsclaus.com
> > >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
> > >>> > >>
> > >>> > >>
> > >>> > >> ------------------------------
> > >>> > >> If you reply to this email, your message will be added to the
> > >>> > discussion
> > >>> > >> below:
> > >>> > >>
> > >>> > >>
> > >>> >
> > >>> > >> .
> > >>> > >> 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
> > >>> >
> > >>> >
> > >>> > >>
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> > > --
> > >>> > > Thanks & Regards
> > >>> > > Prabu.N
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> > > --
> > >>> > > View this message in context:
> > >>> >
> > >>>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> > >>> >
> > >>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > >>> >
> > >>> >
> > >>> >
> > >>> > ------------------------------
> > >>> >  If you reply to this email, your message will be added to the
> > discussion
> > >>> > below:
> > >>> >
> > >>> >
> > >>>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> > >>> >  To unsubscribe from Camel routing issue, 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
> > >>> >
> > >>> >
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> Thanks & Regards
> > >>>  Prabu.N
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> View this message in context:
> > >>>
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> > >>> Sent from the Camel - Users mailing list archive at Nabble.com.
> > >>>
> > >>
> > >>
> > >>
> > >> --
> > >> Claus Ibsen
> > >> -----------------
> > >> Red Hat, Inc.
> > >> FuseSource is now part of Red Hat
> > >> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=6>
> > >> Web: http://fusesource.com
> > >> Twitter: davsclaus
> > >> Blog: http://davsclaus.com
> > >> Author of Camel in Action: http://www.manning.com/ibsen
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730152&i=7>
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730152.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730156.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

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

See this EIP
http://camel.apache.org/content-enricher.html

About pollEnrich.

Though pollEnrich currently does support dynamic uris. Its on the roadmap,
for Camel 3.0.
It requires an API change and thus isn't so easy to implement currently on
2.x.

You can always use a java bean / camel processor, and consume the ftp file
from java code.
For example using consumer template.

As you use FTP you may want to set disconnect=true so the connect is not
remained open after usage.



On Sun, Mar 31, 2013 at 7:51 PM, Chris Wolf <cw...@gmail.com> wrote:

> Ok, I'm starting to get it - a little bit.  As for my concrete
> example, so far, I have:
>
>                 from("direct:start")
>                 .beanRef("config")
>                 .convertBodyTo(Document.class)
>                 .recipientList().xquery(
>                     "concat('ftp://'" +
>                     ",//remote[vendorId/@value='CBOE34']/server/@value" +
>
>
> ",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
> +
>                     ",'?noop=true&amp;username='" +
>                     ",//remote[vendorId/@value='CBOE34']/username/@value" +
>                     ",'&amp;password='" +
>
> ",//remote[vendorId/@value='CBOE34']/password/@value)", String.class);
>
> Here's the problem - this will create an FTP Producer - that's not
> what I need.  I need a dynamically
> constructed URI for a polling FTP consumer.  I don't think
> "recipientList" will work...   Any ideas?
>
> Thanks,
>
> Chris
>
> On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <cw...@gmail.com> wrote:
> > Hi Claus,
> >
> > I hate to ask this - but I still don't get it.  I thought
> > "recipientList" was for sending to multiple, runtime-defined
> > recipients.  I don't see how this
> > answers the question of sending to one, single recipient, whose URI is
> > dynamically constructed - and in my use-case the dynamic settings
> > are not in properties - so "simple" (property place-holders) won't help
> me.
> >
> > Let me give you a concrete example.  I need to do an ftp download and
> > the connection information comes from up-stream in the route in the
> > form of XML (DOM - a Document instance).  Currently, I am trying to do
> > this with bean binding and method params decorated with @XPath
> > pointing into the Document with the ftp settings and inside the
> > this method doing:
> >
> > FtpComponent ftpComponent = context.getComponent("ftp",
> FtpComponent.class);
> >
> > ..and then attempt to get the endpoint and call createConsumer(...).
> > I'm sure this is not the right way to do it, but I don't see how else
> > - any ideas?
> >
> > Thanks,
> >
> >
> > Chris
> >
> > On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <cl...@gmail.com>
> wrote:
> >> Hi
> >>
> >> See this FAQ
> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> >>
> >>
> >>
> >>
> >> On Sun, Mar 31, 2013 at 5:22 AM, prabumca06@gmail.com
> >> <pr...@gmail.com>wrote:
> >>
> >>> Thanks Walzer..
> >>> *
> >>> *
> >>> *Queston1:
> >>>
> >>> *
> >>> *Example*
> >>>
> >>> .when(header("foo").isEqualTo("bar"))
> >>>                     .to("direct:b")
> >>>
> >>> In my case i have to add more than 80 condition and forwards to 80
> >>> different queues.
> >>>
> >>> Above example i can only hard-code queue name,But what i want is below.
> >>>
> >>> * .when(header("Type").isNotNull())
> >>>     .to("activemq.Inbound."+header("Type"))
> >>> *
> >>>
> >>> Example:If queue type is test,It should forward to *Inbound.test*
> queue.
> >>>
> >>> Above example i tried,but it did not worked,created queue something
> >>> like this *Inbound.header("type")*
> >>>
> >>> *Question2*:
> >>>
> >>> from("direct:a")
> >>>             .multicast().to("direct:b", "direct:c", "direct:d");
> >>>
> >>> Based on messages header and content type i want forward to different
> >>> queue.
> >>>
> >>> condition will be *OR *and *AND*.How can i do that like above example.*
> >>> *
> >>>
> >>> Thanks in advance*
> >>> *
> >>>
> >>> *Regards*
> >>>
> >>> Prabu.N
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
> >>> ml-node+s465427n5730116h98@n5.nabble.com> wrote:
> >>>
> >>> > Hi,
> >>> >
> >>> > you could start by reading Claus´ book (p. 44ff) which has a perfect
> >>> > example or http://camel.apache.org/content-based-router.html (just
> >>> > replace the direct: with your queues).
> >>> > If you need to fire your messages to multiple queues:
> >>> > http://camel.apache.org/publish-subscribe-channel.html shows you the
> >>> > various ways.
> >>> > When you get the concepts you can just "lego" them together.
> >>> >
> >>> > Regards, Thomas.
> >>> >
> >>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> >>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> >>> > <[hidden email] <
> http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> >>> >
> >>> > > Hi Claus,
> >>> > >
> >>> > > Thanks so much Clus for help.It is working now.
> >>> > >
> >>> > > I need your guidance for the following requirement.
> >>> > >
> >>> > > 1.I have one *inbound queue* it will receive message frequently
> from my
> >>> > > application.
> >>> > > 2.From *inbound queue* i need camel routing to move message from
> >>> > > another *message
> >>> > > based inbound queue* based on message header value.
> >>> > > 3.From *message based inbound queue *i* *need camel routing to move
> >>> > message
> >>> > > to *one or more outbound queue *based on message content*
> >>> > > *
> >>> > >
> >>> > > I need *camel java DSL*sample code for above requirement.*
> >>> > > *
> >>> > > *
> >>> > > *
> >>> > > *Thanks in advance*
> >>> > >
> >>> > >
> >>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
> >>> > > [hidden email] <
> http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> >>> > wrote:
> >>> > >
> >>> > >> Hi
> >>> > >>
> >>> > >> Do as the exception tells you. Check route 2. You route from
> >>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
> >>> > >>
> >>> > >> Maybe you need to add "activemq:" as prefix so its
> >>> > >> "activemq:Inbound.SSS.TestEvent".
> >>> > >>
> >>> > >>
> >>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> >>> > >> <[hidden email] <
> http://user/SendEmail.jtp?type=node&node=5730109&i=1
> >>> >>
> >>> >
> >>> > >> wrote:
> >>> > >>
> >>> > >>>
> >>> > >>> I have activemmq  Project in that i have following requirement
> >>> > >>>
> >>> > >>> 1.Move message from Inbound queue to type based inbound queue.
> >>> > >>> 2.Move message from Message type inbound queue to outbound queue
> >>> > >>>
> >>> > >>> I have created two bean for to achieve this.
> >>> > >>>
> >>> > >>> 1.one for move from inbound to message type  inbound queue
> >>> > >>> 2.one for move from inbound to outbound queue.
> >>> > >>>
> >>> > >>> I have following entry in camel.xml
> >>> > >>>
> >>> > >>>   <camelContext id="camel" xmlns="
> >>> > http://camel.apache.org/schema/spring">
> >>> > >>
> >>> > >>>
> >>> > >>>                <routeBuilder ref="routeBuilder" />
> >>> > >>>            <routeBuilder ref="routeBuilder1" />
> >>> > >>>
> >>> > >>>    </camelContext>
> >>> > >>>
> >>> > >>>    <bean id="routeBuilder"
> >>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> >>> > >>>    <bean id="recipientsGenerator"
> >>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> >>> > >>>    <bean id="routeBuilder1"
> >>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
> >>> > >>>    <bean id="recipientsGenerator1"
> >>> > >>> class="com.camel.routes.RecipientListBean"/>
> >>> > >>>
> >>> > >>> When i run application i am getting following error.
> >>> > >>>
> >>> > >>> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
> >>> > >>> org.apache.camel.Fa
> >>> > >>> iledToCreateRouteException: Failed to create route route2:
> >>> > >>> Route[[From[Inbound.G
> >>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No endpoint
> >>> > could
> >>> > >> be
> >>> > >>> found
> >>> > >>> for: Inbound.SSS.TestEvent, please check your classpath contains
> the
> >>> > >> needed
> >>> > >>> Cam
> >>> > >>> el component jar.*
> >>> > >>>
> >>> > >>> I am not sure i am missing any configuration,Please kindly help
> me
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>>
> >>> > >>> --
> >>> > >>> View this message in context:
> >>> > >>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> >>> > >>> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>> > >>
> >>> > >>
> >>> > >>
> >>> > >> --
> >>> > >> Claus Ibsen
> >>> > >> -----------------
> >>> > >> Red Hat, Inc.
> >>> > >> FuseSource is now part of Red Hat
> >>> > >> Email: [hidden email]<
> >>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> >>> > >> Web: http://fusesource.com
> >>> > >> Twitter: davsclaus
> >>> > >> Blog: http://davsclaus.com
> >>> > >> Author of Camel in Action: http://www.manning.com/ibsen
> >>> > >>
> >>> > >>
> >>> > >> ------------------------------
> >>> > >> If you reply to this email, your message will be added to the
> >>> > discussion
> >>> > >> below:
> >>> > >>
> >>> > >>
> >>> >
> >>> > >> .
> >>> > >> 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
> >>> >
> >>> >
> >>> > >>
> >>> > >
> >>> > >
> >>> > >
> >>> > > --
> >>> > > Thanks & Regards
> >>> > > Prabu.N
> >>> > >
> >>> > >
> >>> > >
> >>> > >
> >>> > > --
> >>> > > View this message in context:
> >>> >
> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> >>> >
> >>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >>> >
> >>> >
> >>> >
> >>> > ------------------------------
> >>> >  If you reply to this email, your message will be added to the
> discussion
> >>> > below:
> >>> >
> >>> >
> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> >>> >  To unsubscribe from Camel routing issue, click here<
> >>>
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
> >>> >
> >>> > .
> >>> > 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
> >>> >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Thanks & Regards
> >>>  Prabu.N
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> >>> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>>
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> FuseSource is now part of Red Hat
> >> Email: cibsen@redhat.com
> >> Web: http://fusesource.com
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel routing issue

Posted by Chris Wolf <cw...@gmail.com>.
Ok, I'm starting to get it - a little bit.  As for my concrete
example, so far, I have:

                from("direct:start")
                .beanRef("config")
                .convertBodyTo(Document.class)
                .recipientList().xquery(
                    "concat('ftp://'" +
                    ",//remote[vendorId/@value='CBOE34']/server/@value" +

",//remote[vendorId/@value='CBOE34']/param[name/@value='directory']/value/@value"
+
                    ",'?noop=true&amp;username='" +
                    ",//remote[vendorId/@value='CBOE34']/username/@value" +
                    ",'&amp;password='" +

",//remote[vendorId/@value='CBOE34']/password/@value)", String.class);

Here's the problem - this will create an FTP Producer - that's not
what I need.  I need a dynamically
constructed URI for a polling FTP consumer.  I don't think
"recipientList" will work...   Any ideas?

Thanks,

Chris

On Sun, Mar 31, 2013 at 10:27 AM, Chris Wolf <cw...@gmail.com> wrote:
> Hi Claus,
>
> I hate to ask this - but I still don't get it.  I thought
> "recipientList" was for sending to multiple, runtime-defined
> recipients.  I don't see how this
> answers the question of sending to one, single recipient, whose URI is
> dynamically constructed - and in my use-case the dynamic settings
> are not in properties - so "simple" (property place-holders) won't help me.
>
> Let me give you a concrete example.  I need to do an ftp download and
> the connection information comes from up-stream in the route in the
> form of XML (DOM - a Document instance).  Currently, I am trying to do
> this with bean binding and method params decorated with @XPath
> pointing into the Document with the ftp settings and inside the
> this method doing:
>
> FtpComponent ftpComponent = context.getComponent("ftp", FtpComponent.class);
>
> ..and then attempt to get the endpoint and call createConsumer(...).
> I'm sure this is not the right way to do it, but I don't see how else
> - any ideas?
>
> Thanks,
>
>
> Chris
>
> On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <cl...@gmail.com> wrote:
>> Hi
>>
>> See this FAQ
>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>>
>>
>>
>>
>> On Sun, Mar 31, 2013 at 5:22 AM, prabumca06@gmail.com
>> <pr...@gmail.com>wrote:
>>
>>> Thanks Walzer..
>>> *
>>> *
>>> *Queston1:
>>>
>>> *
>>> *Example*
>>>
>>> .when(header("foo").isEqualTo("bar"))
>>>                     .to("direct:b")
>>>
>>> In my case i have to add more than 80 condition and forwards to 80
>>> different queues.
>>>
>>> Above example i can only hard-code queue name,But what i want is below.
>>>
>>> * .when(header("Type").isNotNull())
>>>     .to("activemq.Inbound."+header("Type"))
>>> *
>>>
>>> Example:If queue type is test,It should forward to *Inbound.test* queue.
>>>
>>> Above example i tried,but it did not worked,created queue something
>>> like this *Inbound.header("type")*
>>>
>>> *Question2*:
>>>
>>> from("direct:a")
>>>             .multicast().to("direct:b", "direct:c", "direct:d");
>>>
>>> Based on messages header and content type i want forward to different
>>> queue.
>>>
>>> condition will be *OR *and *AND*.How can i do that like above example.*
>>> *
>>>
>>> Thanks in advance*
>>> *
>>>
>>> *Regards*
>>>
>>> Prabu.N
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
>>> ml-node+s465427n5730116h98@n5.nabble.com> wrote:
>>>
>>> > Hi,
>>> >
>>> > you could start by reading Claus´ book (p. 44ff) which has a perfect
>>> > example or http://camel.apache.org/content-based-router.html (just
>>> > replace the direct: with your queues).
>>> > If you need to fire your messages to multiple queues:
>>> > http://camel.apache.org/publish-subscribe-channel.html shows you the
>>> > various ways.
>>> > When you get the concepts you can just "lego" them together.
>>> >
>>> > Regards, Thomas.
>>> >
>>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
>>> > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>>> >
>>> > > Hi Claus,
>>> > >
>>> > > Thanks so much Clus for help.It is working now.
>>> > >
>>> > > I need your guidance for the following requirement.
>>> > >
>>> > > 1.I have one *inbound queue* it will receive message frequently from my
>>> > > application.
>>> > > 2.From *inbound queue* i need camel routing to move message from
>>> > > another *message
>>> > > based inbound queue* based on message header value.
>>> > > 3.From *message based inbound queue *i* *need camel routing to move
>>> > message
>>> > > to *one or more outbound queue *based on message content*
>>> > > *
>>> > >
>>> > > I need *camel java DSL*sample code for above requirement.*
>>> > > *
>>> > > *
>>> > > *
>>> > > *Thanks in advance*
>>> > >
>>> > >
>>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
>>> > > [hidden email] <http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>>> > wrote:
>>> > >
>>> > >> Hi
>>> > >>
>>> > >> Do as the exception tells you. Check route 2. You route from
>>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
>>> > >>
>>> > >> Maybe you need to add "activemq:" as prefix so its
>>> > >> "activemq:Inbound.SSS.TestEvent".
>>> > >>
>>> > >>
>>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
>>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
>>> > >> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730109&i=1
>>> >>
>>> >
>>> > >> wrote:
>>> > >>
>>> > >>>
>>> > >>> I have activemmq  Project in that i have following requirement
>>> > >>>
>>> > >>> 1.Move message from Inbound queue to type based inbound queue.
>>> > >>> 2.Move message from Message type inbound queue to outbound queue
>>> > >>>
>>> > >>> I have created two bean for to achieve this.
>>> > >>>
>>> > >>> 1.one for move from inbound to message type  inbound queue
>>> > >>> 2.one for move from inbound to outbound queue.
>>> > >>>
>>> > >>> I have following entry in camel.xml
>>> > >>>
>>> > >>>   <camelContext id="camel" xmlns="
>>> > http://camel.apache.org/schema/spring">
>>> > >>
>>> > >>>
>>> > >>>                <routeBuilder ref="routeBuilder" />
>>> > >>>            <routeBuilder ref="routeBuilder1" />
>>> > >>>
>>> > >>>    </camelContext>
>>> > >>>
>>> > >>>    <bean id="routeBuilder"
>>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
>>> > >>>    <bean id="recipientsGenerator"
>>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
>>> > >>>    <bean id="routeBuilder1"
>>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
>>> > >>>    <bean id="recipientsGenerator1"
>>> > >>> class="com.camel.routes.RecipientListBean"/>
>>> > >>>
>>> > >>> When i run application i am getting following error.
>>> > >>>
>>> > >>> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
>>> > >>> org.apache.camel.Fa
>>> > >>> iledToCreateRouteException: Failed to create route route2:
>>> > >>> Route[[From[Inbound.G
>>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No endpoint
>>> > could
>>> > >> be
>>> > >>> found
>>> > >>> for: Inbound.SSS.TestEvent, please check your classpath contains the
>>> > >> needed
>>> > >>> Cam
>>> > >>> el component jar.*
>>> > >>>
>>> > >>> I am not sure i am missing any configuration,Please kindly help me
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>>
>>> > >>> --
>>> > >>> View this message in context:
>>> > >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>>> > >>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>> > >>
>>> > >>
>>> > >>
>>> > >> --
>>> > >> Claus Ibsen
>>> > >> -----------------
>>> > >> Red Hat, Inc.
>>> > >> FuseSource is now part of Red Hat
>>> > >> Email: [hidden email]<
>>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
>>> > >> Web: http://fusesource.com
>>> > >> Twitter: davsclaus
>>> > >> Blog: http://davsclaus.com
>>> > >> Author of Camel in Action: http://www.manning.com/ibsen
>>> > >>
>>> > >>
>>> > >> ------------------------------
>>> > >> If you reply to this email, your message will be added to the
>>> > discussion
>>> > >> below:
>>> > >>
>>> > >>
>>> >
>>> > >> .
>>> > >> 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
>>> >
>>> >
>>> > >>
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > Thanks & Regards
>>> > > Prabu.N
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > View this message in context:
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>>> >
>>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
>>> >
>>> >
>>> >
>>> > ------------------------------
>>> >  If you reply to this email, your message will be added to the discussion
>>> > below:
>>> >
>>> >
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>>> >  To unsubscribe from Camel routing issue, click here<
>>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
>>> >
>>> > .
>>> > 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
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Thanks & Regards
>>>  Prabu.N
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cibsen@redhat.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel routing issue

Posted by Chris Wolf <cw...@gmail.com>.
Hi Claus,

I hate to ask this - but I still don't get it.  I thought
"recipientList" was for sending to multiple, runtime-defined
recipients.  I don't see how this
answers the question of sending to one, single recipient, whose URI is
dynamically constructed - and in my use-case the dynamic settings
are not in properties - so "simple" (property place-holders) won't help me.

Let me give you a concrete example.  I need to do an ftp download and
the connection information comes from up-stream in the route in the
form of XML (DOM - a Document instance).  Currently, I am trying to do
this with bean binding and method params decorated with @XPath
pointing into the Document with the ftp settings and inside the
this method doing:

FtpComponent ftpComponent = context.getComponent("ftp", FtpComponent.class);

..and then attempt to get the endpoint and call createConsumer(...).
I'm sure this is not the right way to do it, but I don't see how else
- any ideas?

Thanks,


Chris

On Sun, Mar 31, 2013 at 2:28 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> See this FAQ
> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>
>
>
>
> On Sun, Mar 31, 2013 at 5:22 AM, prabumca06@gmail.com
> <pr...@gmail.com>wrote:
>
>> Thanks Walzer..
>> *
>> *
>> *Queston1:
>>
>> *
>> *Example*
>>
>> .when(header("foo").isEqualTo("bar"))
>>                     .to("direct:b")
>>
>> In my case i have to add more than 80 condition and forwards to 80
>> different queues.
>>
>> Above example i can only hard-code queue name,But what i want is below.
>>
>> * .when(header("Type").isNotNull())
>>     .to("activemq.Inbound."+header("Type"))
>> *
>>
>> Example:If queue type is test,It should forward to *Inbound.test* queue.
>>
>> Above example i tried,but it did not worked,created queue something
>> like this *Inbound.header("type")*
>>
>> *Question2*:
>>
>> from("direct:a")
>>             .multicast().to("direct:b", "direct:c", "direct:d");
>>
>> Based on messages header and content type i want forward to different
>> queue.
>>
>> condition will be *OR *and *AND*.How can i do that like above example.*
>> *
>>
>> Thanks in advance*
>> *
>>
>> *Regards*
>>
>> Prabu.N
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
>> ml-node+s465427n5730116h98@n5.nabble.com> wrote:
>>
>> > Hi,
>> >
>> > you could start by reading Claus´ book (p. 44ff) which has a perfect
>> > example or http://camel.apache.org/content-based-router.html (just
>> > replace the direct: with your queues).
>> > If you need to fire your messages to multiple queues:
>> > http://camel.apache.org/publish-subscribe-channel.html shows you the
>> > various ways.
>> > When you get the concepts you can just "lego" them together.
>> >
>> > Regards, Thomas.
>> >
>> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
>> > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>> >
>> > > Hi Claus,
>> > >
>> > > Thanks so much Clus for help.It is working now.
>> > >
>> > > I need your guidance for the following requirement.
>> > >
>> > > 1.I have one *inbound queue* it will receive message frequently from my
>> > > application.
>> > > 2.From *inbound queue* i need camel routing to move message from
>> > > another *message
>> > > based inbound queue* based on message header value.
>> > > 3.From *message based inbound queue *i* *need camel routing to move
>> > message
>> > > to *one or more outbound queue *based on message content*
>> > > *
>> > >
>> > > I need *camel java DSL*sample code for above requirement.*
>> > > *
>> > > *
>> > > *
>> > > *Thanks in advance*
>> > >
>> > >
>> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
>> > > [hidden email] <http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
>> > wrote:
>> > >
>> > >> Hi
>> > >>
>> > >> Do as the exception tells you. Check route 2. You route from
>> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
>> > >>
>> > >> Maybe you need to add "activemq:" as prefix so its
>> > >> "activemq:Inbound.SSS.TestEvent".
>> > >>
>> > >>
>> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
>> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
>> > >> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730109&i=1
>> >>
>> >
>> > >> wrote:
>> > >>
>> > >>>
>> > >>> I have activemmq  Project in that i have following requirement
>> > >>>
>> > >>> 1.Move message from Inbound queue to type based inbound queue.
>> > >>> 2.Move message from Message type inbound queue to outbound queue
>> > >>>
>> > >>> I have created two bean for to achieve this.
>> > >>>
>> > >>> 1.one for move from inbound to message type  inbound queue
>> > >>> 2.one for move from inbound to outbound queue.
>> > >>>
>> > >>> I have following entry in camel.xml
>> > >>>
>> > >>>   <camelContext id="camel" xmlns="
>> > http://camel.apache.org/schema/spring">
>> > >>
>> > >>>
>> > >>>                <routeBuilder ref="routeBuilder" />
>> > >>>            <routeBuilder ref="routeBuilder1" />
>> > >>>
>> > >>>    </camelContext>
>> > >>>
>> > >>>    <bean id="routeBuilder"
>> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
>> > >>>    <bean id="recipientsGenerator"
>> > >>> class="com.camel.routes.TypeSpecificListBean"/>
>> > >>>    <bean id="routeBuilder1"
>> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
>> > >>>    <bean id="recipientsGenerator1"
>> > >>> class="com.camel.routes.RecipientListBean"/>
>> > >>>
>> > >>> When i run application i am getting following error.
>> > >>>
>> > >>> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
>> > >>> org.apache.camel.Fa
>> > >>> iledToCreateRouteException: Failed to create route route2:
>> > >>> Route[[From[Inbound.G
>> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No endpoint
>> > could
>> > >> be
>> > >>> found
>> > >>> for: Inbound.SSS.TestEvent, please check your classpath contains the
>> > >> needed
>> > >>> Cam
>> > >>> el component jar.*
>> > >>>
>> > >>> I am not sure i am missing any configuration,Please kindly help me
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>> --
>> > >>> View this message in context:
>> > >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>> > >>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Claus Ibsen
>> > >> -----------------
>> > >> Red Hat, Inc.
>> > >> FuseSource is now part of Red Hat
>> > >> Email: [hidden email]<
>> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
>> > >> Web: http://fusesource.com
>> > >> Twitter: davsclaus
>> > >> Blog: http://davsclaus.com
>> > >> Author of Camel in Action: http://www.manning.com/ibsen
>> > >>
>> > >>
>> > >> ------------------------------
>> > >> If you reply to this email, your message will be added to the
>> > discussion
>> > >> below:
>> > >>
>> > >>
>> >
>> > >> .
>> > >> 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
>> >
>> >
>> > >>
>> > >
>> > >
>> > >
>> > > --
>> > > Thanks & Regards
>> > > Prabu.N
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > > View this message in context:
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>> >
>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >
>> >
>> >
>> > ------------------------------
>> >  If you reply to this email, your message will be added to the discussion
>> > below:
>> >
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>> >  To unsubscribe from Camel routing issue, click here<
>> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
>> >
>> > .
>> > 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
>> >
>> >
>>
>>
>>
>> --
>> Thanks & Regards
>>  Prabu.N
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel routing issue

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

See this FAQ
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html




On Sun, Mar 31, 2013 at 5:22 AM, prabumca06@gmail.com
<pr...@gmail.com>wrote:

> Thanks Walzer..
> *
> *
> *Queston1:
>
> *
> *Example*
>
> .when(header("foo").isEqualTo("bar"))
>                     .to("direct:b")
>
> In my case i have to add more than 80 condition and forwards to 80
> different queues.
>
> Above example i can only hard-code queue name,But what i want is below.
>
> * .when(header("Type").isNotNull())
>     .to("activemq.Inbound."+header("Type"))
> *
>
> Example:If queue type is test,It should forward to *Inbound.test* queue.
>
> Above example i tried,but it did not worked,created queue something
> like this *Inbound.header("type")*
>
> *Question2*:
>
> from("direct:a")
>             .multicast().to("direct:b", "direct:c", "direct:d");
>
> Based on messages header and content type i want forward to different
> queue.
>
> condition will be *OR *and *AND*.How can i do that like above example.*
> *
>
> Thanks in advance*
> *
>
> *Regards*
>
> Prabu.N
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
> ml-node+s465427n5730116h98@n5.nabble.com> wrote:
>
> > Hi,
> >
> > you could start by reading Claus´ book (p. 44ff) which has a perfect
> > example or http://camel.apache.org/content-based-router.html (just
> > replace the direct: with your queues).
> > If you need to fire your messages to multiple queues:
> > http://camel.apache.org/publish-subscribe-channel.html shows you the
> > various ways.
> > When you get the concepts you can just "lego" them together.
> >
> > Regards, Thomas.
> >
> > Am 30.03.2013 um 19:05 schrieb "[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> > <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
> >
> > > Hi Claus,
> > >
> > > Thanks so much Clus for help.It is working now.
> > >
> > > I need your guidance for the following requirement.
> > >
> > > 1.I have one *inbound queue* it will receive message frequently from my
> > > application.
> > > 2.From *inbound queue* i need camel routing to move message from
> > > another *message
> > > based inbound queue* based on message header value.
> > > 3.From *message based inbound queue *i* *need camel routing to move
> > message
> > > to *one or more outbound queue *based on message content*
> > > *
> > >
> > > I need *camel java DSL*sample code for above requirement.*
> > > *
> > > *
> > > *
> > > *Thanks in advance*
> > >
> > >
> > > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
> > > [hidden email] <http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> > wrote:
> > >
> > >> Hi
> > >>
> > >> Do as the exception tells you. Check route 2. You route from
> > >> "Inbound.SSS.TestEvent". And that is now know to Camel.
> > >>
> > >> Maybe you need to add "activemq:" as prefix so its
> > >> "activemq:Inbound.SSS.TestEvent".
> > >>
> > >>
> > >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> > >> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730109&i=1
> >>
> >
> > >> wrote:
> > >>
> > >>>
> > >>> I have activemmq  Project in that i have following requirement
> > >>>
> > >>> 1.Move message from Inbound queue to type based inbound queue.
> > >>> 2.Move message from Message type inbound queue to outbound queue
> > >>>
> > >>> I have created two bean for to achieve this.
> > >>>
> > >>> 1.one for move from inbound to message type  inbound queue
> > >>> 2.one for move from inbound to outbound queue.
> > >>>
> > >>> I have following entry in camel.xml
> > >>>
> > >>>   <camelContext id="camel" xmlns="
> > http://camel.apache.org/schema/spring">
> > >>
> > >>>
> > >>>                <routeBuilder ref="routeBuilder" />
> > >>>            <routeBuilder ref="routeBuilder1" />
> > >>>
> > >>>    </camelContext>
> > >>>
> > >>>    <bean id="routeBuilder"
> > >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> > >>>    <bean id="recipientsGenerator"
> > >>> class="com.camel.routes.TypeSpecificListBean"/>
> > >>>    <bean id="routeBuilder1"
> > >>> class="com.camel.routes.MulticastRouteBuilder"/>
> > >>>    <bean id="recipientsGenerator1"
> > >>> class="com.camel.routes.RecipientListBean"/>
> > >>>
> > >>> When i run application i am getting following error.
> > >>>
> > >>> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
> > >>> org.apache.camel.Fa
> > >>> iledToCreateRouteException: Failed to create route route2:
> > >>> Route[[From[Inbound.G
> > >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No endpoint
> > could
> > >> be
> > >>> found
> > >>> for: Inbound.SSS.TestEvent, please check your classpath contains the
> > >> needed
> > >>> Cam
> > >>> el component jar.*
> > >>>
> > >>> I am not sure i am missing any configuration,Please kindly help me
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> View this message in context:
> > >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> > >>> Sent from the Camel - Users mailing list archive at Nabble.com.
> > >>
> > >>
> > >>
> > >> --
> > >> Claus Ibsen
> > >> -----------------
> > >> Red Hat, Inc.
> > >> FuseSource is now part of Red Hat
> > >> Email: [hidden email]<
> > http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> > >> Web: http://fusesource.com
> > >> Twitter: davsclaus
> > >> Blog: http://davsclaus.com
> > >> Author of Camel in Action: http://www.manning.com/ibsen
> > >>
> > >>
> > >> ------------------------------
> > >> If you reply to this email, your message will be added to the
> > discussion
> > >> below:
> > >>
> > >>
> >
> > >> .
> > >> 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
> >
> >
> > >>
> > >
> > >
> > >
> > > --
> > > Thanks & Regards
> > > Prabu.N
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> >
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
> >  To unsubscribe from Camel routing issue, click here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=
> >
> > .
> > 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
> >
> >
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Thanks Walzer..
*
*
*Queston1:

*
*Example*

.when(header("foo").isEqualTo("bar"))
                    .to("direct:b")

In my case i have to add more than 80 condition and forwards to 80
different queues.

Above example i can only hard-code queue name,But what i want is below.

* .when(header("Type").isNotNull())
    .to("activemq.Inbound."+header("Type"))
*

Example:If queue type is test,It should forward to *Inbound.test* queue.

Above example i tried,but it did not worked,created queue something
like this *Inbound.header("type")*

*Question2*:

from("direct:a")
            .multicast().to("direct:b", "direct:c", "direct:d");

Based on messages header and content type i want forward to different queue.

condition will be *OR *and *AND*.How can i do that like above example.*
*

Thanks in advance*
*

*Regards*

Prabu.N













On Sun, Mar 31, 2013 at 2:43 AM, Walzer, Thomas [via Camel] <
ml-node+s465427n5730116h98@n5.nabble.com> wrote:

> Hi,
>
> you could start by reading Claus´ book (p. 44ff) which has a perfect
> example or http://camel.apache.org/content-based-router.html (just
> replace the direct: with your queues).
> If you need to fire your messages to multiple queues:
> http://camel.apache.org/publish-subscribe-channel.html shows you the
> various ways.
> When you get the concepts you can just "lego" them together.
>
> Regards, Thomas.
>
> Am 30.03.2013 um 19:05 schrieb "[hidden email]<http://user/SendEmail.jtp?type=node&node=5730116&i=0>"
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730116&i=1>>:
>
> > Hi Claus,
> >
> > Thanks so much Clus for help.It is working now.
> >
> > I need your guidance for the following requirement.
> >
> > 1.I have one *inbound queue* it will receive message frequently from my
> > application.
> > 2.From *inbound queue* i need camel routing to move message from
> > another *message
> > based inbound queue* based on message header value.
> > 3.From *message based inbound queue *i* *need camel routing to move
> message
> > to *one or more outbound queue *based on message content*
> > *
> >
> > I need *camel java DSL*sample code for above requirement.*
> > *
> > *
> > *
> > *Thanks in advance*
> >
> >
> > On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5730116&i=2>>
> wrote:
> >
> >> Hi
> >>
> >> Do as the exception tells you. Check route 2. You route from
> >> "Inbound.SSS.TestEvent". And that is now know to Camel.
> >>
> >> Maybe you need to add "activemq:" as prefix so its
> >> "activemq:Inbound.SSS.TestEvent".
> >>
> >>
> >> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> >> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730109&i=1>>
>
> >> wrote:
> >>
> >>>
> >>> I have activemmq  Project in that i have following requirement
> >>>
> >>> 1.Move message from Inbound queue to type based inbound queue.
> >>> 2.Move message from Message type inbound queue to outbound queue
> >>>
> >>> I have created two bean for to achieve this.
> >>>
> >>> 1.one for move from inbound to message type  inbound queue
> >>> 2.one for move from inbound to outbound queue.
> >>>
> >>> I have following entry in camel.xml
> >>>
> >>>   <camelContext id="camel" xmlns="
> http://camel.apache.org/schema/spring">
> >>
> >>>
> >>>                <routeBuilder ref="routeBuilder" />
> >>>            <routeBuilder ref="routeBuilder1" />
> >>>
> >>>    </camelContext>
> >>>
> >>>    <bean id="routeBuilder"
> >>> class="com.camel.routes.SinglecastRouteBuilder"/>
> >>>    <bean id="recipientsGenerator"
> >>> class="com.camel.routes.TypeSpecificListBean"/>
> >>>    <bean id="routeBuilder1"
> >>> class="com.camel.routes.MulticastRouteBuilder"/>
> >>>    <bean id="recipientsGenerator1"
> >>> class="com.camel.routes.RecipientListBean"/>
> >>>
> >>> When i run application i am getting following error.
> >>>
> >>> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
> >>> org.apache.camel.Fa
> >>> iledToCreateRouteException: Failed to create route route2:
> >>> Route[[From[Inbound.G
> >>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No endpoint
> could
> >> be
> >>> found
> >>> for: Inbound.SSS.TestEvent, please check your classpath contains the
> >> needed
> >>> Cam
> >>> el component jar.*
> >>>
> >>> I am not sure i am missing any configuration,Please kindly help me
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> >>> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> FuseSource is now part of Red Hat
> >> Email: [hidden email]<
> http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> >> Web: http://fusesource.com
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >>
> >>
> >> ------------------------------
> >> If you reply to this email, your message will be added to the
> discussion
> >> below:
> >>
> >>
>
> >> .
> >> 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>
>
> >>
> >
> >
> >
> > --
> > Thanks & Regards
> > Prabu.N
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730116.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730118.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "Walzer, Thomas" <th...@integratix.net>.
Hi,

you could start by reading Claus´ book (p. 44ff) which has a perfect example or http://camel.apache.org/content-based-router.html (just replace the direct: with your queues).
If you need to fire your messages to multiple queues: http://camel.apache.org/publish-subscribe-channel.html shows you the various ways. 
When you get the concepts you can just "lego" them together.

Regards, Thomas.

Am 30.03.2013 um 19:05 schrieb "prabumca06@gmail.com" <pr...@gmail.com>:

> Hi Claus,
> 
> Thanks so much Clus for help.It is working now.
> 
> I need your guidance for the following requirement.
> 
> 1.I have one *inbound queue* it will receive message frequently from my
> application.
> 2.From *inbound queue* i need camel routing to move message from
> another *message
> based inbound queue* based on message header value.
> 3.From *message based inbound queue *i* *need camel routing to move message
> to *one or more outbound queue *based on message content*
> *
> 
> I need *camel java DSL*sample code for above requirement.*
> *
> *
> *
> *Thanks in advance*
> 
> 
> On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
> ml-node+s465427n5730109h81@n5.nabble.com> wrote:
> 
>> Hi
>> 
>> Do as the exception tells you. Check route 2. You route from
>> "Inbound.SSS.TestEvent". And that is now know to Camel.
>> 
>> Maybe you need to add "activemq:" as prefix so its
>> "activemq:Inbound.SSS.TestEvent".
>> 
>> 
>> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730109&i=0>
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730109&i=1>>
>> wrote:
>> 
>>> 
>>> I have activemmq  Project in that i have following requirement
>>> 
>>> 1.Move message from Inbound queue to type based inbound queue.
>>> 2.Move message from Message type inbound queue to outbound queue
>>> 
>>> I have created two bean for to achieve this.
>>> 
>>> 1.one for move from inbound to message type  inbound queue
>>> 2.one for move from inbound to outbound queue.
>>> 
>>> I have following entry in camel.xml
>>> 
>>>   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>> 
>>> 
>>>                <routeBuilder ref="routeBuilder" />
>>>            <routeBuilder ref="routeBuilder1" />
>>> 
>>>    </camelContext>
>>> 
>>>    <bean id="routeBuilder"
>>> class="com.camel.routes.SinglecastRouteBuilder"/>
>>>    <bean id="recipientsGenerator"
>>> class="com.camel.routes.TypeSpecificListBean"/>
>>>    <bean id="routeBuilder1"
>>> class="com.camel.routes.MulticastRouteBuilder"/>
>>>    <bean id="recipientsGenerator1"
>>> class="com.camel.routes.RecipientListBean"/>
>>> 
>>> When i run application i am getting following error.
>>> 
>>> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
>>> org.apache.camel.Fa
>>> iledToCreateRouteException: Failed to create route route2:
>>> Route[[From[Inbound.G
>>> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No endpoint could
>> be
>>> found
>>> for: Inbound.SSS.TestEvent, please check your classpath contains the
>> needed
>>> Cam
>>> el component jar.*
>>> 
>>> I am not sure i am missing any configuration,Please kindly help me
>>> 
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>> 
>> 
>> 
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730109&i=2>
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>> 
>> 
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> 
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730109.html
>> To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>> 
> 
> 
> 
> -- 
> Thanks & Regards
> Prabu.N
> 
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi Claus,

Thanks so much Clus for help.It is working now.

I need your guidance for the following requirement.

1.I have one *inbound queue* it will receive message frequently from my
application.
2.From *inbound queue* i need camel routing to move message from
another *message
based inbound queue* based on message header value.
3.From *message based inbound queue *i* *need camel routing to move message
to *one or more outbound queue *based on message content*
*

I need *camel java DSL*sample code for above requirement.*
*
*
*
*Thanks in advance*


On Sat, Mar 30, 2013 at 3:10 PM, Claus Ibsen-2 [via Camel] <
ml-node+s465427n5730109h81@n5.nabble.com> wrote:

> Hi
>
> Do as the exception tells you. Check route 2. You route from
> "Inbound.SSS.TestEvent". And that is now know to Camel.
>
> Maybe you need to add "activemq:" as prefix so its
> "activemq:Inbound.SSS.TestEvent".
>
>
> On Fri, Mar 29, 2013 at 7:01 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5730109&i=0>
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5730109&i=1>>
> wrote:
>
> >
> > I have activemmq  Project in that i have following requirement
> >
> > 1.Move message from Inbound queue to type based inbound queue.
> > 2.Move message from Message type inbound queue to outbound queue
> >
> > I have created two bean for to achieve this.
> >
> > 1.one for move from inbound to message type  inbound queue
> > 2.one for move from inbound to outbound queue.
> >
> > I have following entry in camel.xml
> >
> >    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>
> >
> >                 <routeBuilder ref="routeBuilder" />
> >             <routeBuilder ref="routeBuilder1" />
> >
> >     </camelContext>
> >
> >     <bean id="routeBuilder"
> > class="com.camel.routes.SinglecastRouteBuilder"/>
> >     <bean id="recipientsGenerator"
> > class="com.camel.routes.TypeSpecificListBean"/>
> >     <bean id="routeBuilder1"
> > class="com.camel.routes.MulticastRouteBuilder"/>
> >     <bean id="recipientsGenerator1"
> > class="com.camel.routes.RecipientListBean"/>
> >
> > When i run application i am getting following error.
> >
> > * java.lang.Exception: org.apache.camel.RuntimeCamelException:
> > org.apache.camel.Fa
> > iledToCreateRouteException: Failed to create route route2:
> > Route[[From[Inbound.G
> > MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No endpoint could
> be
> > found
> >  for: Inbound.SSS.TestEvent, please check your classpath contains the
> needed
> > Cam
> > el component jar.*
> >
> > I am not sure i am missing any configuration,Please kindly help me
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5730109&i=2>
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730109.html
>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
> .
> 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>
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5730115.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

Posted by "prabumca06@gmail.com" <pr...@gmail.com>.
Hi all,

Good morning,

I am trying to use when and filter both in my routing,but it didn't work

I hope it will give you idea what i am trying to achieve

from(ACT_TYPE_SPECFIC_QNAME).choice()
   .when(header(EVENT_TYPE).isEqualTo(ACT_TRANSACTION))
   .filter(simple("{body[isCredit]} == true"))
   .process(new Processor() {
    public void process(Exchange exchange) {
        Map map = (Map) exchange.getIn().getBody();
        String Account_No = (String) map.get(ACCOUNT_ID);
        Map<String,Object> newBody = new HashMap<String, Object>();
        newBody.put(ACCOUNT_ID, Account_No);
        exchange.getIn().setBody(newBody);

    }}).to(ACTIVATE_QNAME)
   .endChoice()
   .otherwise()
   .setHeader(DESTINATION, constant(DESTINATION_VALUE))
   .to(EROOR_QNAME)
   .end();

Message reached ACT_TYPE_SPECFIC_QNAME but it only checking when (
.when(header(EVENT_TYPE).isEqualTo(ACT_TRANSACTION)) ) condition routing
message to ACTIVATE_QNAME

Filter not working property in this case.

Please kindly help me




On Wed, Sep 4, 2013 at 11:48 PM, Prabu <pr...@gmail.com> wrote:

> Hi All,
>
> Camel i having code like this
>
> from(MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME).process(new
> MemosProcess(*getContext().**createProducerTemplate()*))
> .end();
>
> Above code worked fine in activemq 5.5 but after upgrade into active 5.8
> it is not working.
>
> Message getting hang in MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME not
> calling memosprocess class.
>
> Please kindly help me.
>
> *Thanks*
> Prabu.N
>
>
>
> On Wed, Jul 24, 2013 at 11:49 PM, Christian Mueller [via Camel] <
> ml-node+s465427n5736234h56@n5.nabble.com> wrote:
>
>> The test ensure it works:
>>
>> @Test
>> public void testInOnlyJMSExpiration() throws Exception {
>>     MockEndpoint mock = getMockEndpoint("mock:result");
>>     mock.expectedMessageCount(1);
>>
>>     long ttl = System.currentTimeMillis() + 5000;
>>
>> template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
>> "Hello World", "JMSExpiration", ttl);
>>
>>     // sleep just a little
>>     Thread.sleep(2000);
>>
>>     // use timeout in case running on slow box
>>     Exchange bar = consumer.receive("activemq:queue:bar", 10000);
>>     assertNotNull("Should be a message on queue", bar);
>>
>>     template.send("activemq:queue:foo", bar);
>>
>>     assertMockEndpointsSatisfied();
>> }
>>
>> @Test
>> public void testInOnlyJMSExpirationNoMessage() throws Exception {
>>     MockEndpoint mock = getMockEndpoint("mock:result");
>>     mock.expectedMessageCount(1);
>>
>>     long ttl = System.currentTimeMillis() + 2000;
>>
>> template.sendBodyAndHeader("activemq:queue:bar?preserveMessageQos=true",
>> "Hello World", "JMSExpiration", ttl);
>>
>>     // sleep more so the message is expired
>>     Thread.sleep(5000);
>>
>>     Exchange bar = consumer.receiveNoWait("activemq:queue:bar");
>>     assertNull("Should NOT be a message on queue", bar);
>>
>>     template.sendBody("activemq:queue:foo", "Hello World");
>>
>>     assertMockEndpointsSatisfied();
>> }
>>
>> protected RouteBuilder createRouteBuilder() throws Exception {
>>     return new RouteBuilder() {
>>         public void configure() throws Exception {
>>             from("activemq:queue:foo")
>>                 .to("mock:result");
>>         }
>>     };
>> }
>>
>> Check what you do differently...
>>
>> Best,
>> Christian
>> -----------------
>>
>> Software Integration Specialist
>>
>> Apache Camel committer: https://camel.apache.org/team
>> V.P. Apache Camel: https://www.apache.org/foundation/
>> Apache Member: https://www.apache.org/foundation/members.html
>>
>> https://www.linkedin.com/pub/christian-mueller/11/551/642
>>
>>
>> On Wed, Jul 24, 2013 at 4:42 PM, [hidden email]<http://user/SendEmail.jtp?type=node&node=5736234&i=0>
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5736234&i=1>>wrote:
>>
>>
>> > Hi Chris,
>> >
>> >  Thanks so much for the information.
>> >
>> > I have tried different property but it did not work.
>> >
>> > Please find my code below.
>> >
>> > *public static final String CONSUMER_TEST_QNAME     =
>> >
>> >
>> "activemq:queue:ConsumerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
>>
>> > *
>> > *
>> > *
>> > *public static final String PRODUCER_TEST_QNAME     =
>> >
>> >
>> "activemq:queue:ProducerTestHandler?jmsMessageType=Text&preserveMessageQos=true";
>>
>> > *
>> > *    *
>> > *public static final String MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME
>>  =
>> > "activemq:queue:Inbound.Memos.Consumer.Test";*
>> > *
>> > *
>> > *public static final String MESSAGING_TEST_PRODUCER_TYPE_SPECIFIC_QNAME
>>  =
>> > "activemq:queue:Inbound.Memos.Producer.Test";*
>> >
>> >
>> > from(*MESSAGING_TEST_CONSUMER_TYPE_SPECIFIC_QNAME*).process(new
>> Processor()
>> > {
>> >      public void process(Exchange exchange) throws Exception {
>> >
>> >      }
>> >          .setHeader(MEMOS_TARGET_SERVER,header(MASTER_HANDLER))
>> >          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
>> >          .to(CONSUMER_TEST_QNAME)
>> >          .setHeader(MEMOS_TARGET_SERVER, header(SLAVE_HANDLER))
>> >          .setHeader(JMSExpiration,constant(EXPIRY_TIME))
>> >          .to(CONSUMER_TEST_QNAME)
>> >          .end();
>> >
>> > But,messages not expiring
>> >
>> > Please kindly help me
>> >
>> > *Thanks*
>> > Prabu.N
>> >
>> >
>> > On Wed, Jul 24, 2013 at 1:46 AM, Christian Mueller [via Camel] <
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=5736234&i=2>>
>> wrote:
>> >
>> > > It's not really so difficult to find an example, if you spend only a
>> few
>> > > minutes:
>> > >
>> > >
>> >
>> https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsProducerWithJMSHeaderTest.java;h=52b430b17a7ffc0ca977864ea8c6238050f90a57;hb=HEAD
>> > >
>> > > Best,
>> > > Christian
>> > > -----------------
>> > >
>> > > Software Integration Specialist
>> > >
>> > > Apache Camel committer: https://camel.apache.org/team
>> > > V.P. Apache Camel: https://www.apache.org/foundation/
>> > > Apache Member: https://www.apache.org/foundation/members.html
>> > >
>> > > https://www.linkedin.com/pub/christian-mueller/11/551/642
>> > >
>> > >
>> > > ------------------------------
>> > >  If you reply to this email, your message will be added to the
>> discussion
>> > > below:
>> > >
>> > >
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736163.html
>> > >  To unsubscribe from Camel routing issue, 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
>> > >
>> > >
>> >
>> >
>> >
>> > --
>> > Thanks & Regards
>> >  Prabu.N
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736224.html
>>
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5736234.html
>>  To unsubscribe from Camel routing issue, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5730094&code=cHJhYnVtY2EwNkBnbWFpbC5jb218NTczMDA5NHw4OTY0MTU3ODg=>
>> .
>> 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>
>>
>
>
>
> --
> Thanks & Regards
>  Prabu.N
>



-- 
Thanks & Regards
 Prabu.N




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094p5741054.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel routing issue

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

Do as the exception tells you. Check route 2. You route from
"Inbound.SSS.TestEvent". And that is now know to Camel.

Maybe you need to add "activemq:" as prefix so its
"activemq:Inbound.SSS.TestEvent".


On Fri, Mar 29, 2013 at 7:01 PM, prabumca06@gmail.com
<pr...@gmail.com> wrote:
>
> I have activemmq  Project in that i have following requirement
>
> 1.Move message from Inbound queue to type based inbound queue.
> 2.Move message from Message type inbound queue to outbound queue
>
> I have created two bean for to achieve this.
>
> 1.one for move from inbound to message type  inbound queue
> 2.one for move from inbound to outbound queue.
>
> I have following entry in camel.xml
>
>    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>
>                 <routeBuilder ref="routeBuilder" />
>             <routeBuilder ref="routeBuilder1" />
>
>     </camelContext>
>
>     <bean id="routeBuilder"
> class="com.camel.routes.SinglecastRouteBuilder"/>
>     <bean id="recipientsGenerator"
> class="com.camel.routes.TypeSpecificListBean"/>
>     <bean id="routeBuilder1"
> class="com.camel.routes.MulticastRouteBuilder"/>
>     <bean id="recipientsGenerator1"
> class="com.camel.routes.RecipientListBean"/>
>
> When i run application i am getting following error.
>
> * java.lang.Exception: org.apache.camel.RuntimeCamelException:
> org.apache.camel.Fa
> iledToCreateRouteException: Failed to create route route2:
> Route[[From[Inbound.G
> MD.TestEvent]] -> [Multicast[[Bean[ref:... because of No endpoint could be
> found
>  for: Inbound.SSS.TestEvent, please check your classpath contains the needed
> Cam
> el component jar.*
>
> I am not sure i am missing any configuration,Please kindly help me
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-routing-issue-tp5730094.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen