1 Reply Latest reply on Oct 22, 2003 4:24 PM by Elias Ross

    Invalid message property name: JMSXDeliveryCount

    pjrmoreira Newbie

      Hello,

      I have a MDB consuming a message from a MQSeries queue (JBoss 3.21 and MQSeries 5.3). Should there is a problem reading the message, then the transaction will rollback, and the message will go back to the queue. In the in invoker-proxy-binging we can define the maximum number of times that the MDB will try to consume the same message. Whenever this value is reached, JBoss will try to put the message in a dead-letter queue. I'm using a JBoss queue for that (queue/DLQ). My problem is that before placing the message in the DLQ, JBoss tries to set the JMSXDeliveryCount property in the message. The message is a MQSeries message, and doesn't support this property, throwing an exception (please see bellow). JBoss will keep doing this (reading the message, trying to put it in the DLQ, having the exception, putting it back in the queue) for ever.
      Is there any way to solve this problem?

      Regards

      Paulo

      16:04:32,755 WARN [DLQHandler] Message resent too many times; sending it to DLQ; message id=ID:c3e2d840d4f5f3f04040404040404040ba3573b1e62f7000
      16:04:32,770 ERROR [DLQHandler] Could not send message to Dead Letter Queue
      javax.jms.MessageFormatException: MQJMS1058: Invalid message property name: JMSXDeliveryCount
      at com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:4557)
      at com.ibm.jms.JMSMessage.setStringProperty(JMSMessage.java:5505)
      at org.jboss.ejb.plugins.jms.DLQHandler.makeWritable(DLQHandler.java:336)
      at org.jboss.ejb.plugins.jms.DLQHandler.sendMessage(DLQHandler.java:277)
      at org.jboss.ejb.plugins.jms.DLQHandler.handleRedeliveredMessage(DLQHandler.java:210)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1011)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:241)
      at com.ibm.mq.jms.MQSession.run(MQSession.java:1136)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:179)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
      at java.lang.Thread.run(Thread.java:536)

        • 1. Re: Invalid message property name: JMSXDeliveryCount
          Elias Ross Master


          Actually, what JBoss is doing is copying the properties from the original message into a "cloned" message. The JMSXDeliveryCount is a property coming from the original "IBM" message. Apparently, IBM makes it read-only, or only available by the receiver.

          From the JavaDoc:

          The JMS API reserves the JMSX property name prefix for JMS defined properties. The full set of these properties is defined in the Java Message Service specification. New JMS defined properties may be added in later versions of the JMS API. Support for these properties is optional. The String[] ConnectionMetaData.getJMSXPropertyNames method returns the names of the JMSX properties supported by a connection.

          JMSX properties may be referenced in message selectors whether or not they are supported by a connection. If they are not present in a message, they are treated like any other absent property.

          JMSX properties defined in the specification as "set by provider on send" are available to both the producer and the consumers of the message. JMSX properties defined in the specification as "set by provider on receive" are available only to the consumers.

          JMSXGroupID and JMSXGroupSeq are standard properties that clients should use if they want to group messages. All providers must support them. Unless specifically noted, the values and semantics of the JMSX properties are undefined.