|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
HELP - "Unable to write message to dead letter queue&qu |
« View previous topic :: View next topic » |
Author |
Message
|
john_hilgedick |
Posted: Mon Apr 07, 2008 2:19 pm Post subject: HELP - "Unable to write message to dead letter queue&qu |
|
|
Newbie
Joined: 07 Apr 2008 Posts: 2
|
Hello all,
I've got a queue - it's a "dead letter" queue. I've written a client that attempts to read messages off of this dead letter queue using QueueReceiver.receiveNoWait(). However, every time I try to read a message off the dead letter queue, I get a "Unable to write message to dead letter queue" error message. The exception that is thrown does NOT have a linked exception - so I have no idea what is causing this problem. As I said above, I do not have a dead letter queue defined for this queue - and I don't want one.
These messages in this dead letter queue were placed here from *another* queue because my primary application was unable to process them. Now I just trying to write a secondary application that will read them (and remove them) from this dead letter queue.
Here' some code to give you an idea of what I'm doing:
QueueConnection qc = mqJMSFactory.createQueueConnection(host, port,
manager, userName, password);
QueueSession session = mqJMSFactory.createQueueSession(qc);
QueueReceiver receiver = mqJMSFactory.createQueueReceiver(session,
queue);
qc.start();
Message msg = receiver.receiveNoWait();
Am I doing something obviously wrong? Why would calling receiveNoWait() throw this exception (since the application hasn't even tried to process the message yet)? Do I need to indicate in the session that this queue doesn't have a dead letter queue?
Any light you can shed would be appreciated.
-john |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Apr 07, 2008 2:52 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
you need inquire and put authority to the DLQ.
If the queue has a BOThreshold >0 and no backout queue has been configured, messages that are over the BOThresh get put to the DLQ with 2362. (Standard JMS)
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
john_hilgedick |
Posted: Tue Apr 08, 2008 8:08 am Post subject: |
|
|
Newbie
Joined: 07 Apr 2008 Posts: 2
|
fjb_saper wrote: |
you need inquire and put authority to the DLQ.
If the queue has a BOThreshold >0 and no backout queue has been configured, messages that are over the BOThresh get put to the DLQ with 2362. (Standard JMS)
Enjoy  |
I misspoke - I apologize - let me start over. I am attempting to read messages off of a BACKOUT queue - not a DLQ. My PRIMARY application was unable to process a message and so the message was placed on a BACKOUT queue. My SECONDARY application is now attempting to remove items from the BACKOUT queue. When the SECONDARY application attempts to QueueReceiver.receiveNoWait(), an exception is thrown. Here is the stack:
javax.jms.JMSException: MQJMS1079: Unable to write message to dead letter queue
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironm
ent.java:567)
at com.ibm.mq.jms.MQMessageConsumer.deadLetter(MQMessageConsumer.java:40
3
at com.ibm.mq.jms.MQMessageConsumer.removeBadMessage(MQMessageConsumer.j
ava:4406)
at com.ibm.mq.jms.MQMessageConsumer.getMessage(MQMessageConsumer.java:32
62)
at com.ibm.mq.jms.MQMessageConsumer.receiveInternal(MQMessageConsumer.ja
va:2655)
at com.ibm.mq.jms.MQMessageConsumer.receiveNoWait(MQMessageConsumer.java
:2497)
You can see that the exception is thrown INSIDE the receiveNoWait() call - meaning my secondary application doesn't even get a chance to process the message. Why would this be? Can messages on a BACKOUT queue be so corrupted that they can't be received by a consumer (and are, therefore, automatically placed on a DLQ)?
Short of nuking the BACKOUT queue, is there anyway to get this "bad message" of my BACKOUT queue? Do I have to have a DLQ defined in order to get this message off my BACKOUT queue?
Thanks!
-john |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Apr 08, 2008 8:16 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Have you tried looking at the messages with amqsbcg? It should read the backout queue without any problems and give you a feel for what the messages actually look like. |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Apr 08, 2008 8:17 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
On a whim, do you have a dead letter queue defined for the queue manager? If you don't, define one and then see if the message gets requeued and why. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Apr 08, 2008 1:23 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And make sure your BACKOUT queue has no bothresh defined! _________________ MQ & Broker admin |
|
Back to top |
|
 |
SAFraser |
Posted: Tue Apr 08, 2008 2:21 pm Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|