2 Replies Latest reply on Dec 5, 2012 11:58 PM by tobysaville

    issue with JMSRouter and message-prop properties

    tobysaville

      The JMSRouter looks for config tree properties with a key starting with message-prop- which are trimed to exclude message-prop- part and then defined on the JMS message. Presumably this approach is designed to pass JMS_* properties to the JMS message that are otherwise excluded in the DefaultJMSPropertiesSetter. However, for the JBoss properties defined in the below article, these property values need to be set using setInt / setLong.

       

      https://community.jboss.org/wiki/WhatVendorSpecificPropertiesDoesJBossMQProvide

       

      So if i configure message-prop-JMS_JBOSS_SCHEDULED_DELIVERY on my JMSRouter, this ends up being set with setString and subsequently ignored by jboss-messaging.

       

      I had to add an implementation of DefaultJMSPropertiesSetter that sets the properties defined in WhatVendorSpecificPropertiesDoesJBossMQProvide using the correct setInt / setLong methods.

       

      cheers

      toby

        • 1. Re: issue with JMSRouter and message-prop properties
          tcunning

          Toby,

           

          Which AS are you using?     Are you sure you are using jbossmq rather than jboss-messaging?

           

          --Tom

          • 2. Re: issue with JMSRouter and message-prop properties
            tobysaville

            Hi Tom,

             

            im using

             

            Release ID: JBoss [SOA] 5.2.0.GA_SOA (build: SVNTag=5.2.0.GA_SOA date=201111090730)

             

            pretty sure im using jboss-messaging but im not 100%. it will be the default implementation that comes with that version (which i assumed to be jboss-messaging).

             

            either way, this works in my JMSPropertiesSetter implementation

             

            toJMSMessage.setLongProperty("JMS_JBOSS_SCHEDULED_DELIVERY", new Long(value.toString()).longValue());

             

            and this doesnt have any effect in JMSRouter

             

            msg.setStringProperty(key.substring(messagePropPrefix.length()), property.getValue());

             

            where key is message-prop-JMS_JBOSS_SCHEDULED_DELIVERY

             

            cheers

            toby