ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » HELP - "Unable to write message to dead letter queue&qu

Post new topic  Reply to topic
 HELP - "Unable to write message to dead letter queue&qu « View previous topic :: View next topic » 
Author Message
john_hilgedick
PostPosted: Mon Apr 07, 2008 2:19 pm    Post subject: HELP - "Unable to write message to dead letter queue&qu Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Apr 07, 2008 2:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
john_hilgedick
PostPosted: Tue Apr 08, 2008 8:08 am    Post subject: Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Tue Apr 08, 2008 8:16 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
bower5932
PostPosted: Tue Apr 08, 2008 8:17 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
fjb_saper
PostPosted: Tue Apr 08, 2008 1:23 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
SAFraser
PostPosted: Tue Apr 08, 2008 2:21 pm    Post subject: Reply with quote

Shaman

Joined: 22 Oct 2003
Posts: 742
Location: Austin, Texas, USA

Add code to catch and link the JMS exception to a more specific MQ reason code, and troubleshooting will be easier...
http://www.mqseries.net/phpBB2/viewtopic.php?t=42149
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » HELP - "Unable to write message to dead letter queue&qu
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.