On 09/25/2015 11:44 AM, spamtrap wrote:
> On Fri, 25 Sep 2015 11:34:56 -0400, Timothy Bish
> <[email protected]> wrote:
>
>> On 09/25/2015 11:29 AM, spamtrap wrote:
>>> If you set the message priority with cms::Message::setPriority() and
>>> then send the message with cms::MessageProducer::send() then the
>>> priority of the message is ignored and the message is sent with the
>>> default priority of the MessageProducer. This seems like a bug to me.
>>>
>>>
>>>
>> Not a bug, the CMS API works the same as the JMS API in this regard, the
>> Message set methods can be used on received message to play around with
>> the values but the MessageProducer that sends the Messages is the
>> authority on the values applied on send. To set priority on sent
>> message either set the value using the setter MessageProducer, or use
>> the send method that takes priority as an argument.
> It's certainly counter-intuituive IMHO. Why have a method for setting
> the priority on the message object if it's ignored when sending?
>
>
>
Shouldn't be to hard to figure out it works this way given the API docs
are clear on this fact:
/**
* Sets the Priority Value for this message
*
* CMS providers set this field when a message is sent. This
method can
* be used to change the value for a message that has been received.
*
* @param priority
* priority value for this message
*
* @throws CMSException - if an internal error occurs.
*/
virtual void setCMSPriority(int priority) = 0;
--
Tim Bish
Sr Software Engineer | RedHat Inc.
[email protected] | www.redhat.com
twitter: @tabish121
blog: http://timbish.blogspot.com/