How can I use JMS Priority on a message? The priority isn’t applied by message.setJMSPriority().

hong
hong Guest Posts: 480 ✭✭✭✭✭

Referring to JMS documentation here, you can see that client applications cannot use this method.

To set the priority of the message to be published, you can either configure a default priority value for the Producer: producer.setPriority(priorityLevel), or with producer.send(message, deliveryMode, priorityLevel) to set it on a specific message during the publish.

Note that in order for priority ordering of messages to occur for the consumer, the Solace endpoint from which the messages are being received (Queue or Topic Endpoint) must have the setting “respect message priority” enabled. See these links for more information: