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+s465427n5730920...@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.