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 » needed some samples connected with dead-letter queue...

Post new topic  Reply to topic Goto page 1, 2, 3  Next
 needed some samples connected with dead-letter queue... « View previous topic :: View next topic » 
Author Message
patryx
PostPosted: Fri Aug 10, 2007 12:15 am    Post subject: needed some samples connected with dead-letter queue... Reply with quote

Novice

Joined: 07 Aug 2007
Posts: 12
Location: Poland

Hi!
Maybe someone created a program based on WebSphere Mq IBM where task was to generate a report in detail about messages in dead-letter queue and delete some / all of them and resend some / all of them. Also could be better if there will be oportunity to give easily parameters of work and configuration. My program should be based on C++/C in Unix/Linux. Maybe somebody could show me some codes which could h4elp me to do it? It's my first program connected with WebSpehere so that's why it would be nice to have some samples ot get help to complete my task. Unfortunataly I don't have sufficient number of samples/codes to do it all myself. Could somebody help me?
_________________
Patryx
Back to top
View user's profile Send private message MSN Messenger
Mr Butcher
PostPosted: Fri Aug 10, 2007 2:38 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

if you want to write mq programs and need samples, take the samples that come with mq. they show you e.g. how to put or get messages. google for more free program samples.

for your special dlq case - there is already a dlq handler available that comes with mq. this dlq performs actions on messages sitting in the dlq according to a rule table. check the system administration guide.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
patryx
PostPosted: Fri Aug 10, 2007 3:12 am    Post subject: Reply with quote

Novice

Joined: 07 Aug 2007
Posts: 12
Location: Poland

Problem is that I don't have any samples - they all were deleted unfortunately and I don't have chance to get them back so that's why I asked for them. Could you send me the samples (my WebSphere version is 5.3)?

When it comes to DQL handler - I think there is no use in considering it because I have to create a program in C/C++, not only give some commands in command line: runmqdlq...is there sth to use in C/C++?
_________________
Patryx
Back to top
View user's profile Send private message MSN Messenger
jefflowrey
PostPosted: Fri Aug 10, 2007 3:36 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What do you mean, you don't have a chance to get them back?

The install media should be available, and you should be able to reinstall them.

If the install media is *not* available, then either you don't have a license for the product, or you don't have access/permission to download stuff from your entitlement.

In the second case... someone at your company does.

The DLQ is just another queue. The only thing that's different about it is the format of the messages.

There's a whole big section in the Application Programming Guide on what samples are included with the product.

The rest of the Application Programming Guide is dedicated to teaching you how the MQ API that is used by those samples work.

Happy Reading.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Nigelg
PostPosted: Fri Aug 10, 2007 3:44 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

There is sample source code for a dead letter queue handler in the samp/dlq directory.
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
patryx
PostPosted: Fri Aug 10, 2007 5:50 am    Post subject: Reply with quote

Novice

Joined: 07 Aug 2007
Posts: 12
Location: Poland

Nigelg wrote:
There is sample source code for a dead letter queue handler in the samp/dlq directory.


As I wrote, I don;t have sample sources!
I can't reinstall the WebSphere because i don;t have enough permission to do it in the company and my boss is on holiday so that;s why I asked for the sample codes...could sb send me some?

Could sb tell me if in the same queue could be more than one message with the same messageId? or is it unique in the queue? Because I have to browse all messages in the queue and then some of them remove from the queue and I have no ideal how to do it (ho to recognise in the queue the message). If messageId should be always unique then i could use it to recognise the message but if not (i put some messages with the same messagedIds in local queue and the depth od queue was increased so that's why I donl;t know how does it work)?? Could sb explain me because I couldn't find the answe in the documentacion...
_________________
Patryx
Back to top
View user's profile Send private message MSN Messenger
Vitor
PostPosted: Fri Aug 10, 2007 8:38 am    Post subject: Reply with quote

Grand High Poobah

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

patryx wrote:
As I wrote, I don;t have sample sources!
I can't reinstall the WebSphere because i don;t have enough permission to do it in the company and my boss is on holiday so that;s why I asked for the sample codes...could sb send me some?


And all the samples on the web (like the IBM site) and in this forum are of no help?

patryx wrote:
Could sb tell me if in the same queue could be more than one message with the same messageId? or is it unique in the queue? ..... (i put some messages with the same messagedIds in local queue and the depth od queue was increased so that's why I donl;t know how does it work)?? Could sb explain me because I couldn't find the answe in the documentacion...


MessageId is unique to a queue manager. Do not try and set it yourself, do not treat it as a string, read the Application Programming Guide more carefully and you'll find all this explained.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Aug 10, 2007 9:02 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

MessageId is entirely set by the application that wrote the message.

You can not make any assumptions about a set of messages placed on a queue, if you do not know anything about the applications that wrote them.

Ergo, you can not assume that they have unique message ids, or that they don't all have the same MsgId.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
patryx
PostPosted: Sun Aug 12, 2007 3:39 am    Post subject: Reply with quote

Novice

Joined: 07 Aug 2007
Posts: 12
Location: Poland

Vitor and jefflowrey -> you've different point of view about messageId...so who's right?
how can I put messages to the queue with other messageId? For example when I have ImqMessage msq and then I do msq.setMessageId() and write data and then put it to the queue, what should I do to have other messageId every time when I run program (containing this code)? Because every time the queue is making longer BUT messageId is still the same...
_________________
Patryx
Back to top
View user's profile Send private message MSN Messenger
jefflowrey
PostPosted: Sun Aug 12, 2007 4:23 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can read the Application Programming Guide and find out who's right for yourself.

It will also tell you the answer to your other question.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Aug 12, 2007 4:24 am    Post subject: Reply with quote

Grand High Poobah

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

We both are, though jefflowrey has perhaps been clearer in his posting.

I advised that you should not set or manipulate message id, and told you that a queue manager will always generate a unique message id, as explained in the APG.

But as jefflowrey correctly points out, you can't rely on the application following this advice and trying to set message id in spite of it. Hence while message id should be unique and in 99% of cases will be, it's not something which can be guaranteed except by knowledge of the application program.

I repeat my advice that you shouldn't be messing with it. But it's your requirement and you must do what you feel best.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
patryx
PostPosted: Sun Aug 12, 2007 11:48 am    Post subject: Reply with quote

Novice

Joined: 07 Aug 2007
Posts: 12
Location: Poland

ok i understand. But how should I find the right message to delete after browsing all messages in the queue? just tell me how...?
_________________
Patryx
Back to top
View user's profile Send private message MSN Messenger
fjb_saper
PostPosted: Sun Aug 12, 2007 12:23 pm    Post subject: Reply with quote

Grand High Poobah

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

patryx wrote:
ok i understand. But how should I find the right message to delete after browsing all messages in the queue? just tell me how...?


What does the APG say about Get message under cursor??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Sun Aug 12, 2007 12:34 pm    Post subject: Reply with quote

Grand High Poobah

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

patryx wrote:
But how should I find the right message to delete after browsing all messages in the queue? just tell me how...?


a) It depends what message you're trying to delete, which in turn depends on your requirements
b) If you're trying to remove messages from the system you've still not made it clear why you're not using the provided handler as previously indicated in this post? Don't reinvent the wheel
c) You're also not made it clear why you're browsing all the messages in the queue, then trying to delete them rather than deleting them as you go. Do you have message affinity issues?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
patryx
PostPosted: Sun Aug 12, 2007 1:03 pm    Post subject: Reply with quote

Novice

Joined: 07 Aug 2007
Posts: 12
Location: Poland

I have to browse all messages in dead-letter queue and show information about it and in the program there should be an option to delete all of the messages or only some of them (after browsing I could choose which one/ones...)...
and I don't know how to browse all messages (how should it look like, which options of get to set etc) and the biggest problem how to find again in the dead-letter queue the messages which after browsing I decided to delete...?


Despite this, what's more I have to have an opportunity to try to resend some messages which I point... -> but firstly i would like to know how to resolve earlier problems which I asked you...
_________________
Patryx
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2, 3  Next Page 1 of 3

MQSeries.net Forum Index » General IBM MQ Support » needed some samples connected with dead-letter queue...
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.