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 IndexGeneral IBM MQ SupportMessage lost using dmpmqmsg?

Post new topicReply to topic
Message lost using dmpmqmsg? View previous topic :: View next topic
Author Message
xiaomiphone
PostPosted: Wed Jan 13, 2021 4:46 am Post subject: Message lost using dmpmqmsg? Reply with quote

Newbie

Joined: 13 Jan 2021
Posts: 1

Hello all,

One of my colleagues executed the following command accidentally:

dmpmqmsg -m QMGR -I QUEUE

As you can see, he forgot to mention the -o (output part) and the message got read from the queue, but is now no where to be seen. Shouldn't this operation have been aborted by the command because of no output/file flag, since there is -p flag if I want to purge message explicitly?

Thanks for any help in advance!
Back to top
View user's profile Send private message
hughson
PostPosted: Wed Jan 13, 2021 12:29 pm Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1552
Location: Bay of Plenty, New Zealand

There are two flags that control how the input queue is used:-
  • -I destructive get
  • -i browse
The -p purge flag is to control what happens to messages that don't match any filter you have and would have otherwise been left on the queue when others were (re)moved. You have no filter on the command, so all messages would be worked on by the command and there would have been nothing left to purge.

Your messages are gone, just like they would be if you had run amqsget against the queue.

A good practice to follow would be to take a backup, i.e. a copy, of messages on a queue before you start working on them, just as you would do with files on a file system. Then if you make any mistakes, you can always revert to the backup.

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Wed Jan 13, 2021 12:43 pm Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3195
Location: London, ON Canada

I would say you are screwed. Your colleague appears to have run it in 'clear queue' mode.

The dmpmqmsg page here says:
Quote:
-i or -I Input queue name
The name of the input queue.
Note
Using -i browses the queue, whereas using -I gets messages from the queue.


Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
bruce2359
PostPosted: Wed Jan 13, 2021 1:43 pm Post subject: Re: Message lost using dmpmqmsg? Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8887
Location: US: west coast, almost. Otherwise, enroute.

xiaomiphone wrote:
Hello all,

One of my colleagues executed the following command accidentally:

dmpmqmsg -m QMGR -I QUEUE

Is the colleague still there? I'm asking for a friend who once famously logged on as UNIX superuser and issued rm -r * or some such command.
_________________
Five out of four people have trouble with fractions. - Steven Wright.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jan 14, 2021 5:27 am Post subject: Re: Message lost using dmpmqmsg? Reply with quote

Grand High Poobah

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

bruce2359 wrote:
I'm asking for a friend who once famously logged on as UNIX superuser and issued rm -r * or some such command.


We've all typed that command while logged on as root and then realized we were at the top of the directory tree rather in the directory we were trying to clear.


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
tczielke
PostPosted: Thu Jan 14, 2021 6:13 am Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 912
Location: Illinois, USA

If they were persistent messages, you still may have an option to extract them from the log. Consult with IBM, if you want to pursue this further.
_________________
Working with MQ since 2010.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Jan 14, 2021 6:46 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8887
Location: US: west coast, almost. Otherwise, enroute.

tczielke wrote:
If they were persistent messages, you still may have an option to extract them from the log. Consult with IBM, if you want to pursue this further.

This presumes that the now-missing (not-yet processed) messages can be identified (from those that were already processed), and that logs are available at this late date, and ...
_________________
Five out of four people have trouble with fractions. - Steven Wright.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Jan 14, 2021 7:18 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8887
Location: US: west coast, almost. Otherwise, enroute.

bruce2359 wrote:
tczielke wrote:
If they were persistent messages, you still may have an option to extract them from the log. Consult with IBM, if you want to pursue this further.

This presumes that the now-missing (not-yet processed) messages can be identified (from those that were already processed), and that logs are available at this late date, and ...

A well-written app should be sensitive to missing or duplicate messages, and be able to re-drive the application to compensate.
_________________
Five out of four people have trouble with fractions. - Steven Wright.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportMessage lost using dmpmqmsg?
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.