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/07/23 13:39:55 UTC

Re: Camel routing issue

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