While it is possible to improve throughput with batching acks in transactions, I would recommend to check some other things first. Also note that transactions can introduce other issues, as I have experienced.
Here are things I recommend to try (forgive me if these have already been tried): - First, reproduce the problem outside of production if not already done - Increase the number of consumers on the queue - Attach consumers that do no processing on the messages -- only consume, ack, and discard - this will give a baseline for just how fast the consumers can go between the lowest level of the application and the broker - Consume and produce from the same machine to isolate away potential differences in system, I/O, and network across multiple systems - Measure network and system I/O on the systems (especially the consumer systems) The following information on the messaging use-case would help further: - What QoS is used for the messages (persistent vs non-persistent, etc)? - Are message groups, selectors, or other messaging features used? - Are transactions in-use? If so, are they XA? - How large are the messages? Hope this helps. Art On Fri, Sep 13, 2019 at 4:20 PM Clebert Suconic <clebert.suco...@gmail.com> wrote: > You can batch acks in transactions. > > On Thu, Sep 12, 2019 at 7:14 PM Brian Ramprasad <bri...@cs.utoronto.ca> > wrote: > > > Hi, > > > > I am trying to improve the throughput of queue Consumers. At present the > > Consumers are much slower than the Producers resulting in messages > building > > up inside a queue. From what I can see(maybe I’m wrong) it looks like > > messages are sent to consumers of a queue one at a time in a round robin > > fashion which is not very efficient. Do you know if there is a way to > batch > > messages together when sending to a consumer? For example if I have 2 > > consumers, I want to send them batches of 500 msgs each. > > If I need to implement this feature myself, does anyone know which java > > class I need to modify? > > > > Thanks! > > Brian R > > > > > > -- > Clebert Suconic >