activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: Multiple Producers & one consumer (use of PrefetchPolicy)
Date Fri, 10 May 2013 14:25:28 GMT
No, prefetch is for consumers.
http://activemq.apache.org/what-is-the-prefetch-limit-for.html

Timing would be your issue here. Unless you have control of when the
producers are producing, it could be tough to guarantee the scenario you
want, ie, if producer A, B, and C are independent, they could be producing
at their own rates and intervals, and your consumers would get the messages
based on when they were produced. If you do have control over the
producers, you could add a throttler to the camel route that would slow
bursts of messages produced.




On Fri, May 10, 2013 at 7:13 AM, deepak_a <angeshwar@gmail.com> wrote:

>
>
> 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.
>
> Is setting the PrefetchPolicy to 1 (or something not high enough) in all
> the
> Producers - the right approach to tackle this?
> i.e. this way I ensure that each producer has the same opportunity to send
> a
> definite number of messages to the Queue.
>
>
> regards
> D
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Multiple-Producers-one-consumer-use-of-PrefetchPolicy-tp4666895.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message