Message prioritization
1 posts in topic
Flat View  Flat View

Posted By:   Attila_Szegedi
Posted On:   Tuesday, June 20, 2006 08:42 AM

Does SwiftMQ implement message prioritization?

I.e. if I manipulate message priority with either MessageProducer.setPriority() or Message.setJMSPriority(), how much effort will it make to deliver messages with higher priority earlier?

(Again, apologies if this was already asked - jGuru search database appears to be offline)

Re: Message prioritization

Posted By:   Andreas_Mueller  
Posted On:   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.
About | Sitemap | Contact