Search code examples
jmsamqpspring-jmsspring-amqp

Does Spring JMS allow consumer priority?


I need to set consumer priority in a Java app consuming from an AMQP broker.

I want to use Spring JMS to set the consumer priority.

Broker-side, this seems simple; most popular brokers allow setting consumer priority (ActiveMQ, Qpid, RabbitMQ)

Consumer-side, Spring JMS only seems to provide for message priority via setPriority().

Both Spring JMS and Spring AMQP have a class SimpleMessageListenerContainer, but only Spring AMQP's implementation to allows for consumer priority via setConsumerArguments.

I'd be somewhat surprised if Spring JMS didn't provide for consumer priority, but I haven't found any evidence to the contrary.


Solution

  • In Qpid and RabbitMQ we are talking about an AMQP protocol. The ActiveMQ priority sounds like a feature specific to this JMS vendor. There is no standard JMS specification for the consumer priority. That's why Spring JMS doesn't provide any consumer-based priority option.