activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phillip Merritt (JIRA)" <>
Subject [jira] Updated: (AMQ-122) add support for priority message ordering
Date Fri, 09 Apr 2010 17:41:09 GMT


Phillip Merritt updated AMQ-122:


We had a need to use priority based queuing for a project I am working on and could not wait
for 6.0.0 to come out so we created our own priority based implementation by modifying activemq-core
v5.3.1 checked out from the tags. The attached patch file was created using svn diff. Also
attached is a zip file of new files which were added since I was unsure how to handle new
files as a patch, if there is a better way let me know and I'll do that. Below is a summary
of the changes made in the patch in order to enable priority based queueing
1) Added a useJmsPriority option to the Broker
2) Added the useJmsPriority parameter to the BrokerInfo class
3) Updated code which was creating BrokerInfo instances to set the useJmsPriority
4) Converted MessageDispatchChannel into an Interface
5) Created a new class FifoMessageDispatchChannel which implements MessageDispatchChannel
and contains the same implementation as was previously in MessageDispatchChannel
6) Created a new class PriorityMessageDispatchChannel which contains the newly created PrioritizedMessageDispatchChannel.
This implementation contains an array of priority linkedlists and a current index to the highest
priority linkedlist. So messages are dequeued from the highest priority linked list with messages
and enqueued to the linked list which corresponds to the priority in the message.
7) Created a MessageDispatchChannelFactory which returns the appropriate MessageDispatchChannel
dependent upon the value of the useJmsPriority parameter
8) Updated ActiveMQConnection and ActiveMQSession to only override the message priority when
useJmsPriority is false or the message priority is not set.
9) Added a new unit test JmsPriorityTest in order to test priority ordering

> add support for priority message ordering
> -----------------------------------------
>                 Key: AMQ-122
>                 URL:
>             Project: ActiveMQ
>          Issue Type: New Feature
>          Components: JMS client
>    Affects Versions: 4.0
>         Environment: Solaris 8, Linux, Windows , Java 1.4.2
>            Reporter: Etienne Araya
>            Assignee: Ramzi Saba
>             Fix For: 6.0.0
>         Attachments:, priority_patch.txt
>   Original Estimate: 8 hours
>  Remaining Estimate: 8 hours
> messages with higher priority is not consumed first
> ActiveMQ doesn't yet support priorities.
> messages with greater priority are not consumed first but that are consumed in the arrival

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message