You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Leen Toelen <to...@gmail.com> on 2010/06/15 17:33:37 UTC

Copy messages on same broker

Hi,

what is the best way to copy a message from one queue to multiple queues on
the same activemq broker? I have a setup where one queue is filled by an
external process, and a camel based router is used to copy messages to the
destination queues depending on some business logic. I have a recipient
provider function which returns the queue names depending on the exchange.
The activemq IO seems to become the bottleneck since the original message is
being copied twice to two new queues. Is there a low level copy for activemq
where only the indexes are changed, not the message body?

Regards,
Leen

Re: Copy messages on same broker

Posted by Leen Toelen <to...@gmail.com>.
Hi,

I'll read into this propert to see if I can use it, thanks.

Regards,
Leen

On Wed, Jun 16, 2010 at 9:32 AM, Charles Moulliard <cm...@gmail.com>wrote:

> Hi Leen,
>
> Have you tried to disable this option on ActiveMq -->
> copyMessageOnSend = false to avoid that activemq copy the message
>
> "You can also further optimise things by setting the copyMessageOnSend
>  property to be false; which avoids making a copy of the ObjectMessage
> to send; though this assumes that you don't try and resuse the
> ObjectMessage instance; you just create it once and send it once and
> don't try and change the body of the message after sending it."
>
> tcp://localhost:61616?jms.copyMessageOnSend=false
>
> KR,
>
> Charles Moulliard
>
> Senior Enterprise Architect (J2EE, .NET, SOA)
> Apache Camel/ServiceMix Committer
>
> *******************************************************************
> - Blog : http://cmoulliard.blogspot.com
> - Twitter : http://twitter.com/cmoulliard
> - Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
>
>
> On Tue, Jun 15, 2010 at 5:33 PM, Leen Toelen <to...@gmail.com> wrote:
> > Hi,
> >
> > what is the best way to copy a message from one queue to multiple queues
> on
> > the same activemq broker? I have a setup where one queue is filled by an
> > external process, and a camel based router is used to copy messages to
> the
> > destination queues depending on some business logic. I have a recipient
> > provider function which returns the queue names depending on the
> exchange.
> > The activemq IO seems to become the bottleneck since the original message
> is
> > being copied twice to two new queues. Is there a low level copy for
> activemq
> > where only the indexes are changed, not the message body?
> >
> > Regards,
> > Leen
> >
>

Re: Copy messages on same broker

Posted by Charles Moulliard <cm...@gmail.com>.
Hi Leen,

Have you tried to disable this option on ActiveMq -->
copyMessageOnSend = false to avoid that activemq copy the message

"You can also further optimise things by setting the copyMessageOnSend
 property to be false; which avoids making a copy of the ObjectMessage
to send; though this assumes that you don't try and resuse the
ObjectMessage instance; you just create it once and send it once and
don't try and change the body of the message after sending it."

tcp://localhost:61616?jms.copyMessageOnSend=false

KR,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel/ServiceMix Committer

*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard



On Tue, Jun 15, 2010 at 5:33 PM, Leen Toelen <to...@gmail.com> wrote:
> Hi,
>
> what is the best way to copy a message from one queue to multiple queues on
> the same activemq broker? I have a setup where one queue is filled by an
> external process, and a camel based router is used to copy messages to the
> destination queues depending on some business logic. I have a recipient
> provider function which returns the queue names depending on the exchange.
> The activemq IO seems to become the bottleneck since the original message is
> being copied twice to two new queues. Is there a low level copy for activemq
> where only the indexes are changed, not the message body?
>
> Regards,
> Leen
>

Re: Copy messages on same broker

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

On Tue, Jun 15, 2010 at 5:33 PM, Leen Toelen <to...@gmail.com> wrote:
> Hi,
>
> what is the best way to copy a message from one queue to multiple queues on
> the same activemq broker? I have a setup where one queue is filled by an
> external process, and a camel based router is used to copy messages to the
> destination queues depending on some business logic. I have a recipient
> provider function which returns the queue names depending on the exchange.
> The activemq IO seems to become the bottleneck since the original message is
> being copied twice to two new queues. Is there a low level copy for activemq
> where only the indexes are changed, not the message body?
>

I think this type of questions is an AMQ specific question so please
use the AMQ forum for that.


> Regards,
> Leen
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus