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)