Gert,
I've investigated the code and found class
org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow.

In this class method doRouting(MessageExchangeImpl me) performs JMS routing.
The code is like this:
 try {
                Queue queue = inboundSession.createQueue(destination);
                ObjectMessage msg = inboundSession.createObjectMessage(me);
                MessageProducer queueProducer =
inboundSession.createProducer(queue);
                queueProducer.send(msg);
            } finally {
                inboundSession.close();
            }

Is it ok, if I get some property from Exchange (e.g.
me.getProperty("JMSPriority")) and set to msg JMS Priority here, before
sending?

Will it have any side effects?

Also, I think I would implement some complex mechanism of priorities (i.e
the older message, the higher priority it has).

If ok, I can implement it as interface MessagePriorityStrategy, and set it
as property of AbstractJMSFlow to have ability to use different
implementations if, needed.

What do you think?

Best regards,
 Oleg Atamanenko.

2008/8/7 Gert Vanthienen <[EMAIL PROTECTED]>

> Oleg,
>
> There's no support for message priorities in the default flows inside
> ServiceMix.  We still have a few open issues for priority handling (SM-259,
> SM-884, ...).  I'm not sure if this makes much sense for ST and SEDA flows,
> but we could leverage the JMS message priority for the JMS Flow and JCA
> Flow.  If you implement message priority handling there, it will be
> available for every exchange going through those flows.
>
> However, the new JMS endpoints do support message priority for message
> exchanges.  If you look at
> http://servicemix.apache.org/servicemix-jms-new-endpoints.html, you'll
> notice that you can set the message priority on the message properties
> before you send it to the endpoint.  Adding a JMS consumer/producer pair to
> your route will allow you to determine the need for message priorities on a
> per-route basis.
>
> Gert
>
>
> Oleg Atamanenko wrote:
>
>> Hello everybody.
>>
>> Is there any support for message priorities in service mix?
>> If yes, how can I use it?
>>
>> If no, is it possible to implement it (and how) ?
>>
>> Best regards,
>>    Oleg Atamanenko.
>>
>>
>>
>
>

Reply via email to