Re: Message prioritization
Tuesday, June 20, 2006 10:13 AM
First of all: MessageProducer.setPriority() changes the default priority. So all subsequent send calls from this producer use this priority.
Message.setJMSPriority() must NOT be used from JMS clients. It is used from the JMS provider only (as per JMS spec). To change the priority for individual messages, use the send method with the priority parameter.
SwiftMQ orders its queue indexes 1) by priority and 2) within the same priority by time. So messages with a higher priority are always delivered before messages with lower priority. There is not much effort to ensure priority. It's only to insert the message at the right place at the queue index.