You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by deepak_a <an...@gmail.com> on 2013/05/15 14:26:27 UTC

Query on Multiple Producers & one consumer (use of throttling)

Hi, 

In our system, Camel produces JMS messages from integrated endpoints, which
are consumed by EJB MDBs.   
The EJB application in-turn produces new JMS messages, which are consumed by
Camel to send to other integrated endpoints (eg. WebSphere MQ).   
We use transacted routes, and Atomikos as XA transaction coordinator. 
ActiveMQ 5.6.0, Camel 2.9.0. 

At most only one Queue can be mapped to a single EJB MDB. 

So effectively each EJB consumes messages from a Queue - to which multiple
camel routes (publishers) have published messages. 

I want to ensure that each producer(s) have the same level of priority in
publishing to the Queue. 
i.e. Assume - I have 3 producers, I don't want a scenario where Producer 1
and Producer 2 publish 1000 messages each followed by Producer 3. This will
result in the EJB MDB consuming messages produced by Producer 3 only after
previous 2000 messages. 

I have tried using throttling
http://camel.apache.org/throttler.html

But a concern is that the rate of throttling depends on how quickly the
messages are processed (by the consumer), if throttling is too slow and you
waste throughput.  Too fast and you risk producer flooding the
message-broker.

Is it possible to have a Camel route which does round-robin from 1 or more
JMS queues?

regards
D


regards 
D



--
View this message in context: http://camel.465427.n5.nabble.com/Query-on-Multiple-Producers-one-consumer-use-of-throttling-tp5732608.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Query on Multiple Producers & one consumer (use of throttling)

Posted by deepak_a <an...@gmail.com>.
Hi,

I have been reading about load-balancing in camel.
http://camel.apache.org/load-balancer.html

This makes sense when we intend to spread the load evenly to multiple
consumers.
i.e. one Producer (FROM end point) spreading load to multiple consumers (TO
END POINTS)

is there a way to create load balancing at Producer end 
(i.e. multiple FROM end points - that sequentially pulls messages from one
source(S) 
and send it to ONE 'TO point')

I understand - this is not strictly load balancing - but I am trying to
ensure my consumer gets messages evenly from all FROM Points


regards
D



--
View this message in context: http://camel.465427.n5.nabble.com/Query-on-Multiple-Producers-one-consumer-use-of-throttling-tp5732608p5732619.html
Sent from the Camel - Users mailing list archive at Nabble.com.