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 » Syncpoint, commit, backout

Post new topic  Reply to topic
 Syncpoint, commit, backout « View previous topic :: View next topic » 
Author Message
mpalmer
PostPosted: Tue Mar 26, 2002 10:58 am    Post subject: Reply with quote

Novice

Joined: 25 Mar 2002
Posts: 24
Location: New Jersey, USA

A developer created a C program on AIX (IBM RS6000) to connect to a queue manager, open a queue and put a message. After the MQPUT, he then added a loop to keep the program running for five minutes. While the program was running, he entered cntl-C to abort the program. The 1 message remained on the queue. I expected the message to be recalled from the queue if the program aborted. How do I write a program to put to a queue, but, if the program abends, back out all messages? Else, how does one recover from this situation? On restart, how would you know where in the input file to begin sending messages if say there were 500 messages in the input file and the first 100 got put to the queue? It seems to me that the easiest restart would be to back out all messages put the first time, and resend all messages on restart. Please advise me on design. Thanks much.
Back to top
View user's profile Send private message
mqonnet
PostPosted: Tue Mar 26, 2002 11:08 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

In the event of application failure, i would think that on all O/S, the messages are NOT COMMITTED(I may miss out somethin here). I dont remember if there is an Implicit commit or not(surely would like to get views on this one).

As for why you see the currdepth. That is seen even if the messages are not committed. Just looking at the currdepth does not mean that the messages put by the app were committed before the app died. You should try and browse the messages. If you are able to do so, then the messages are understood to have been committed. But otherwise, it means that those are just the messages the app was trying to put within syncpoint and since it died without issuing explicity commit, the messages are not committed and hence not readable/recoverable.

Cheers.
Kumar

_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mpalmer
PostPosted: Tue Mar 26, 2002 11:19 am    Post subject: Reply with quote

Novice

Joined: 25 Mar 2002
Posts: 24
Location: New Jersey, USA

I looked at the contents of the queue thru MQExplorer. I was able to view the message. This tells me that the message WAS committed even though the program was aborted. Not what I want to happen.
Back to top
View user's profile Send private message
mqonnet
PostPosted: Tue Mar 26, 2002 11:28 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Hmmm... As per one of the docs which i was looking at, on AIX, there is an implicit commit if the application terminates without issuing a Commit which processing messages under syncpoint.

http://www.google.com/search?q=cache:70zjyiycSKUC:www.ibm.com/software/ad/visgen/library/pdf/devanddeploymq.pdf+%22implicit+commit%22+%22aix%22+mqseries&hl=en&ie=UTF8

Look at the end of page 3.

I would look forward to get comments on this one, too.

Cheers.
Kumar


_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mpalmer
PostPosted: Tue Mar 26, 2002 11:36 am    Post subject: Reply with quote

Novice

Joined: 25 Mar 2002
Posts: 24
Location: New Jersey, USA

I cannot access the listed web site from my office (security block). I will try at home, or can you email it to me?
Back to top
View user's profile Send private message
mqonnet
PostPosted: Tue Mar 26, 2002 11:46 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Try this link...
http://www.ibm.com/software/ad/visgen/library/pdf/devanddeploymq.pdf

Cheers.
Kumar

_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PeterPotkay
PostPosted: Tue Mar 26, 2002 1:16 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

You did not say anywhere that you specified the Syncpoint option on the PUT call. If you put with no syncpoint, then the behavior you are seeing is correct. If syncpoint is yes, then every message that you put since the last checkpoint will be removed from the queue in the event of an abnormal termination or MQBACK call.

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
mqonnet
PostPosted: Tue Mar 26, 2002 2:02 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

If syncpoint is yes, then every message that you put since the last checkpoint will be removed from the queue in the event of an abnormal termination or MQBACK call.
---And which means that all the messages put prior to this state would be committed(implicit commit) and be available. But those which have not been checkpointed would be pulled off the queue.

Cheers.
Kumar

_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mpalmer
PostPosted: Wed Mar 27, 2002 6:11 am    Post subject: Reply with quote

Novice

Joined: 25 Mar 2002
Posts: 24
Location: New Jersey, USA

Thanks for your help. I am looking into how to set this option. I will try to find an example on this site. If anyone has an example of how to do this in a C program, please let me know.
Back to top
View user's profile Send private message
bduncan
PostPosted: Wed Mar 27, 2002 2:48 pm    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

Funny, he is allowed to access http://www.mqseries.net from work, but NOT http://www.google.com ???


_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Syncpoint, commit, backout
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.