activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james.strac...@gmail.com>
Subject Re: Camel routing poor performance vs VirtualDestinations and Topics
Date Tue, 31 Mar 2009 21:05:15 GMT
Which version of ActiveMQ/Camel/Spring are you using? Is the camel
code inside the broker? Do you have any specific spring configuration
for the ActiveMQ component?

BTW the out of the box won't be using transactions, so you'll be doing
a request/reply with the broker (I presume using TCP unless you've
some custom config) waiting for the send to hit disk for each
destination before committing the consume. So using a JMS transaction
should speed that up hugely.

However fast we get the camel code; topics and virtual queues are
always gonna be faster; since on the broker side its just moving an in
memory message to multiple destinations in a single thread without the
overhead of going through the JMS client API.

Having said that - if you are testing like for like (e.g. using VM
transport, using transactions & using async sends) it should get
close.


2009/3/31 DanielR <romero.cl@gmail.com>:
>
> Hi.
>
>
> Im getting very slow performance using camel based routing.
>
> I have 1 producer sending messages to QUEUE.COLOR and then ActiveMQ
> duplicate the messages to QUEUE.BLUE and QUEUE.RED (except for topics...).
>
>
> Is this normal?
>
>
> My tests:
>
> 1. Camel Route defined in XML
> 2. Camel Route defined in RouteBuilder Plugin
> 3. VirtualDestination Routing
> 4. Topics
>
>                 Test N°      1        2          3          
4
> Body Size
> 128B                         703     763     6377     10590
> 512B                         670     692     5872     8143
> 1KB                          628     635     5037     4749
> 2KB                          566     557     2376     2641
>
> *messages/second
>
>
> Camel Route defined in XML Code
>
>        <camelContext id="camel"
> xmlns="http://activemq.apache.org/camel/schema/spring">
>                <route>
>                        <from uri="activemq:QUEUE.COLOR" />
>                        <to uri="activemq:QUEUE.RED" />
>                        <to uri="activemq:QUEUE.BLUE" />
>                </route>
>        </camelContext>
>
>
> Camel Route defined in RouteBuilder Plugin Code
>
> class MyRouteBuilder extends RouteBuilder {
>
>    @Override
>    public void configure() throws Exception {
>
>
> from("activemq:queue:QUEUE.COLOR").to("activemq:queue:QUEUE.RED").to("activemq:queue:QUEUE.BLUE");
>    }
>
> }
>
> VirtualDestination Code
>
>                <destinationInterceptors>
>                        <virtualDestinationInterceptor>
>                                <virtualDestinations>
>                                        <compositeQueue name="QUEUE.COLOR">
>                                                <forwardTo>
>                                                        <queue
> physicalName="QUEUE.RED" />
>                                                        <queue
> physicalName="QUEUE.BLUE" />
>                                                </forwardTo>
>                                        </compositeQueue>
>                                </virtualDestinations>
>                        </virtualDestinationInterceptor>
>                </destinationInterceptors>
>
>
>
>
> Graphic with results attached.
>
>
> --
> Regards,
> Daniel Romero P.
>
> http://www.nabble.com/file/p22812467/activemq-routing.jpg
> activemq-routing.jpg
> --
> View this message in context: http://www.nabble.com/Camel-routing-poor-performance-vs-VirtualDestinations-and-Topics-tp22812467p22812467.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Mime
View raw message