You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Jerry Quinn (JIRA)" <ji...@apache.org> on 2009/05/12 21:34:50 UTC

[jira] Created: (AMQ-2247) JMSPriority header value is not propagated

JMSPriority header value is not propagated
------------------------------------------

                 Key: AMQ-2247
                 URL: https://issues.apache.org/activemq/browse/AMQ-2247
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.2.0
         Environment: Debian testing 32 bit x86.  IBM jvm 1.6.0-4
            Reporter: Jerry Quinn


I'm trying to use selectors to simulate priority in queues.  I found that if I use Message.setJMSPriority() with a different number from the default, that number gets ignored and the default value of 4 is put in the message.  Looking at messages in the broker admin web app, the priority is set to 4.

If I instead use MessageProducer.setPriority() to set this, I can successfully change the priority in the header.



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


[jira] Resolved: (AMQ-2247) JMSPriority header value is not propagated

Posted by "Fredrik Jonson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fredrik Jonson resolved AMQ-2247.
---------------------------------

    Resolution: Working as Designed


I believe the behavior you describe complies with the JMS specification. It may be a bit surprising but if you read the javadoc for the setJMSPriority method is states "JMS providers set this field when a message is sent". I.e. it is not intended for the application code, but the message producer.

The application can either, as you mentioned, set the default priority for the producer. Alternatively when the application needs to adjust the level per message, you can use one of the MessageProducer.send() methods that takes a message priority as an argument.

I'll close this issue, but I'm not a activemq commiter, so feel free to reopen this issue again if you feel that my interpretation is invalid or not sufficient for you.

> JMSPriority header value is not propagated
> ------------------------------------------
>
>                 Key: AMQ-2247
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2247
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: Debian testing 32 bit x86.  IBM jvm 1.6.0-4
>            Reporter: Jerry Quinn
>
> I'm trying to use selectors to simulate priority in queues.  I found that if I use Message.setJMSPriority() with a different number from the default, that number gets ignored and the default value of 4 is put in the message.  Looking at messages in the broker admin web app, the priority is set to 4.
> If I instead use MessageProducer.setPriority() to set this, I can successfully change the priority in the header.

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