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 » IBM MQ Java / JMS » read only the message in a Dead Letter

Post new topic  Reply to topic
 read only the message in a Dead Letter « View previous topic :: View next topic » 
Author Message
langrand
PostPosted: Tue Sep 04, 2007 1:59 am    Post subject: read only the message in a Dead Letter Reply with quote

Newbie

Joined: 31 Aug 2007
Posts: 7

Hi,

I would like to know how I can separate the MQDLH form the message.

If I do:
inMessage = qReceiver.receive(Integer.parseInt(waitReponse));
String messageLu = null;
int lgMessage = 0;
if (inMessage instanceof BytesMessage){
byte reponse[] = new byte[4096];
lgMessage = ((BytesMessage) inMessage).readBytes(reponse);
messageLu = new String(reponse);
messageLu = messageLu.substring(0, lgMessage);
}

In messageLu I've got MQDLH+MESSAGE.

I just whan the MESSAGE, could some one help me.

Best regards
Ludovic
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Sep 04, 2007 2:35 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

See this:

http://www.mqseries.net/phpBB2/viewtopic.php?t=39116&highlight=
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Sep 04, 2007 2:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Remember it won't be the same. Now you could use MQ to strip the DLQ header and restore the old MQMD including format, then try post the message and read it again (due to get with convert...)

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
langrand
PostPosted: Tue Sep 04, 2007 3:44 am    Post subject: Reply with quote

Newbie

Joined: 31 Aug 2007
Posts: 7

Hi,

but how can I convert a
javax.jms.BytesMessage to a MQ Message to skip the Header ??
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Sep 04, 2007 3:47 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The easiest way to ignore the DLH in JMS is to not use the DLQ in the first place, and thus ensure that you won't have to deal with messages with DLHs.

The easiest way to do this is to use a Backout Queue and backout processing to put "bad" messages on an application specific queue, rather than a system wide Dead Letter Queue (that is really only intended for messages that can't be delivered by the system).
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
langrand
PostPosted: Tue Sep 04, 2007 4:38 am    Post subject: Reply with quote

Newbie

Joined: 31 Aug 2007
Posts: 7

thanks a lot,

I will definetly use a back OUT queue

Best Regard

Ludovic
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 » IBM MQ Java / JMS » read only the message in a Dead Letter
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.