Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 33492 invoked from network); 29 Sep 2008 17:23:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Sep 2008 17:23:14 -0000 Received: (qmail 59980 invoked by uid 500); 29 Sep 2008 17:23:13 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 59964 invoked by uid 500); 29 Sep 2008 17:23:13 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 59953 invoked by uid 99); 29 Sep 2008 17:23:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 10:23:12 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.69.129.178] (HELO exsmtp02.exserver.dk) (195.69.129.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 17:22:08 +0000 Received: from EXVS04.exserver.dk ([10.10.10.84]) by exsmtp02.exserver.dk with Microsoft SMTPSVC(6.0.3790.1830); Mon, 29 Sep 2008 19:20:14 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: issue routing Exchange to custom method in Processor Date: Mon, 29 Sep 2008 19:22:24 +0200 Message-ID: <4C1FB9C00D24A140906239533638C4D205716B17@EXVS04.exserver.dk> In-Reply-To: <56b1dfc30809290912u1075892uffc7c97d2e996e2e@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: issue routing Exchange to custom method in Processor Thread-Index: AckiTe2vj7slRxUVRh2TNT8jlPt1sAACdAKA From: "Claus Ibsen" To: X-OriginalArrivalTime: 29 Sep 2008 17:20:14.0661 (UTC) FILETIME=[A2DC3750:01C92257] X-Virus-Checked: Checked by ClamAV on apache.org Hi I don't think you should have both @MessageDriven and Processor in the = same java class. You should separate these two. This is not commonly = used. Med venlig hilsen =20 Claus Ibsen ...................................... Silverbullet Skovsg=E5rdsv=E6nget 21 8362 H=F8rning Tlf. +45 2962 7576 Web: www.silverbullet.dk -----Original Message----- From: Mick Knutson [mailto:mknutson@baselogic.com]=20 Sent: 29. september 2008 18:12 To: Camel; Active MQ Subject: Re: issue routing Exchange to custom method in Processor Can someone help me? On Fri, Sep 26, 2008 at 3:10 PM, Mick Knutson = wrote: > The funny thing is, when I have an error with the message coming from = this > queue, which I do because process(Exchange) does not expect my message = body, > the message gets routed to the proper deadLetter channel. > > > > > On Fri, Sep 26, 2008 at 12:22 PM, Mick Knutson = wrote: > >> I have a Processor with 2 different methods: >> >> The standard: >> *public void process(Exchange exchange) { >> * >> >> and a custom: >> >> *@MessageDriven(uri =3D Constants.CHANNEL_GG_CS_COMMAND_STATUS) >> public void onMessage(Exchange exchange) * >> >> Now here is my route: >> >> * from(Constants.CHANNEL_GG_CS_CR_ADD) >> .errorHandler( >> >> deadLetterChannel(Constants.CHANNEL_GG_CS_CR_ADD_ERROR) >> //.maximumRedeliveries(2) >> //.initialRedeliveryDelay(1) >> .loggingLevel(LoggingLevel.DEBUG) >> ).processRef("changeRequestController") >> .to(Constants.CHANNEL_GG_CS_COMMAND_CLUSTER); >> >> >> // Route for command status updates. >> from(Constants.CHANNEL_GG_CS_COMMAND_STATUS) >> .errorHandler( >> >> = deadLetterChannel(Constants.CHANNEL_GG_CS_COMMAND_STATUS_ERROR).maximumRe= deliveries(2) >> .initialRedeliveryDelay(1) >> .loggingLevel(LoggingLevel.INFO) >> = ).to("bean:changeRequestController?methodName=3DonMessage"); >> * >> >> So when I get a message on *Constants.CHANNEL_GG_CS_CR_ADD my >> process(Exchange) method is called, and that rout is fine. >> >> However, I get a response message back on = **Constants.CHANNEL_GG_CS_COMMAND_STATUS >> but it is also processed by *the *process(Exchange) instead of my >> onMessage**(Exchange)* >> >> I have tried @MessageDriven annotation as well as the route builder = but >> neither works. >> >> Am I forced to have each process in a single class? >> >> >> >> -- >> --- >> Thank You... >> >> Mick Knutson >> BASE Logic, inc. >> (415) 354-4215 >> >> Website: http://baselogic.com >> Blog: http://baselogic.com/blog >> BLiNC Magazine: http://blincmagazine.com >> Linked IN: http://linkedin.com/in/mickknutson >> DJ Mick: http://djmick.com >> MySpace: http://myspace.com/mickknutson >> Vacation Rental: http://tahoe.baselogic.com >> >> > > > -- > --- > Thank You... > > Mick Knutson > BASE Logic, inc. > (415) 354-4215 > > Website: http://baselogic.com > Blog: http://baselogic.com/blog > BLiNC Magazine: http://blincmagazine.com > Linked IN: http://linkedin.com/in/mickknutson > DJ Mick: http://djmick.com > MySpace: http://myspace.com/mickknutson > Vacation Rental: http://tahoe.baselogic.com > > --=20 --- Thank You... Mick Knutson BASE Logic, inc. (415) 354-4215 Website: http://baselogic.com Blog: http://baselogic.com/blog BLiNC Magazine: http://blincmagazine.com Linked IN: http://linkedin.com/in/mickknutson DJ Mick: http://djmick.com MySpace: http://myspace.com/mickknutson Vacation Rental: http://tahoe.baselogic.com