[ 
https://issues.apache.org/activemq/browse/SM-259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44847#action_44847
 ] 

Oleg Atamanenko commented on SM-259:
------------------------------------

I've investigated the sources and found, that messages from flow are passed to 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl
and here occurs all the magic.

Is it correct, that we need to modify work with the field queue in the method 
processInBound(MessageExchangeImpl me) ? Ie, putting to queue should be aware 
about priorities. I think, that MessageExchangeImpl should be comparable (for 
compare priority) and queue should be instantiated as 
java.util.concurrent.PriorityBlockingQueue. 

What do you think about it?
======
About configuration of priorities - now I'm trying to develop some code, 
message priority strategy.
It will allow to dynamically modify the priority of the message basing on some 
proeprties of the exchange (e.g, the older exchange - the higher priority it 
has).
It looks good for me to have it in flow configuration.

But maybe it is needed to add property messagePriority to SimpleEndpoint (this 
way we will have ability to configure priority in xbean.xml for any endpoint  
which is inherited from SimpleEndpoint (ConsumerEndpoint and ProviderEndpoint 
do this).

Gert, what do you think?

> Introduce message priority for a given component
> ------------------------------------------------
>
>                 Key: SM-259
>                 URL: https://issues.apache.org/activemq/browse/SM-259
>             Project: ServiceMix
>          Issue Type: Improvement
>            Reporter: Guillaume Nodet
>
> We need to find a capacity bounded, concurrent, ordered queue.
> This may be hard :(

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

Reply via email to