We're trying to build a job queue system on top of ActiveMQ 5.9.1. We're using the AMQP 1.0 support in activemq, currently using the qpid jms library for the client code.
For the purposes of a job queue system, it is vital that we can set prefetch to 1 - we want our job workers to only get one task at a time, competing consumers pattern. The qpid libraries support this using a connection factory definition along the lines of:
connectionfactory.activemq-amqp-manager = amqp://{user}:{password}@{hostname}:{port}?clientid=job-manager&remote-host=default&max-prefetch=1
However, ActiveMQ seems to be completely ignoring this, the consumer shows up in the activemq admin console as having a prefetch of 100.
Digging further, I found the source for: org.apache.activemq.transport.amqp.AmqpProtocolConverter
which includes the line:
consumerInfo.setPrefetchSize(100);
Does this mean that the ActiveMQ support of the AMQP 1.0 protocol hardwires a prefetch value of 100 for all clients? Clearly this is very wrong. What are our options? We could switch to a pure JMS client, but lose language interoperability. Or we could switch to RabbitMQ, which means introducing another product to support (ActiveMQ is already in use elsewhere).