camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Simple duplication of incoming msg with "WireTap" does not work? Avoid re-execution of <route> statement?
Date Wed, 23 Jun 2010 12:02:27 GMT
On Wed, Jun 23, 2010 at 1:56 PM, benxs <> wrote:
> I defined the following <route> for camel in an ActiveMQ installation:
> <route>
>    <from uri="activemq:inputqueue"/>
>    <wireTap uri="activemq:dupequeue"/>
>    <to uri="activemq:inputqueue"/>
> </route>
> Every incoming JMS msg should simply be duplicated. The dupe should be put
> in
> another queue called "dupequeue". The original jms msg should
> remain in the input queue for later retrieval (by other java program).
> Thats all.
> The route definition above does not work.
> The "WireTap" statement is performed successfully but the jms msg is
> re-inserted into the
> same source queue again which cause an endless loop.
> How can I avoid re-application of the route definition once it is execute
> the first time?

If you want to duplicate messages on the JMS broker then you need to
use broker specific solutions for that.
Ask at the AMQ user forum and check the AMQ web site for how to do that.

The JMS component in Camel will *consume* messages from the queue and
route them.

You can also use a JMS queue browser to browse the queue and then be
able to tap the messages.
However the browser doesn't have a callback when new messages arrives
etc. You most likely can do this using native JMS  / AMQ API as well.

But ask at the AMQ forum.

> Ben
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Apache Camel Committer

Author of Camel in Action:
Open Source Integration:

View raw message