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 API Support » Losing MQ messages when box is shutdown.

Post new topic  Reply to topic
 Losing MQ messages when box is shutdown. « View previous topic :: View next topic » 
Author Message
wfudeac92
PostPosted: Mon Jul 24, 2006 9:37 am    Post subject: Losing MQ messages when box is shutdown. Reply with quote

Novice

Joined: 24 Apr 2006
Posts: 21

I currently have a .NET windows service that reads messages off of a MQ queue and processes them. Here are the message get options that I am using.

mqGMO.Options = MQC.MQGMO_WAIT | MQC.MQGMO_SYNCPOINT | MQC.MQGMO_ACCEPT_TRUNCATED_MSG | MQC.MQGMO_CONVERT;

I read each message using a syncpoint and after I process the message I do a commit and read the next message. The problem that I have is that if the server shuts down while I am processing a message, I lose the message. I am never explicitly calling the a QueueManager disconnect inside of the program. I looked at the help text for disconnect and it says the following.

"Any uncommitted changes (message puts and gets) are committed."

Is there any way that I can prevent losing a message when someone reboots a box and does not stop my service?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jul 24, 2006 9:53 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to read up on the default/abend behavior of your programming environment. In other words, you need to make sure your program explicitly calls backout if you need messages to backout.

And you need to make sure your messages are persistent, or you have set the NPMCLASS on the queue to the correct value.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Nigelg
PostPosted: Mon Jul 24, 2006 11:24 pm    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

Quote:
Any uncommitted changes (message puts and gets) are committed


I think that only applies when MQDISC is called or an app ends without calling MQCMIT (or MQBACK).
If an app ends abnormally the Uow is backed out.
_________________
MQSeries.net helps those who help themselves..
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 API Support » Losing MQ messages when box is shutdown.
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.