|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Messages are getting backed out |
« View previous topic :: View next topic » |
Author |
Message
|
devineni25 |
Posted: Tue Nov 01, 2005 10:00 pm Post subject: Messages are getting backed out |
|
|
Newbie
Joined: 01 Nov 2005 Posts: 9
|
I am facing 2 problems with CICS and MQ series
1) 1st problem, When I get an message from the queue. Based on conditions, if it is true, write to Adabas file. If it is not true, then it is going to write to error file. After writting to error file, again it is backing out the message. Once the message has get from the queue, it should never back out. If there is problem also, it should never back out. If it is back out, unnecessarily it is reading the same message. Why it is reading the same message is because, we used the loop to read the message until end of queue.
2) 2nd problem, once the message has errored out in the program also, it should never get back out the message.
** When I read message from the queueu using MQGET, It should never back out the message. Once it is read and it should go and read the next message.
Please advise to avoid this problem.
Last edited by devineni25 on Tue Nov 01, 2005 10:36 pm; edited 1 time in total |
|
Back to top |
|
 |
mqmhr |
Posted: Tue Nov 01, 2005 10:18 pm Post subject: |
|
|
Centurion
Joined: 28 Dec 2004 Posts: 105
|
You can use the option MQGMO_MARK_SKIP_BACKOUT to avoid the first problem. |
|
Back to top |
|
 |
Mr Butcher |
Posted: Tue Nov 01, 2005 11:33 pm Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
Quote: |
"it is backing out the message" |
who or what is "it"?
if you do not want backout / commit handling then work without syncpoint, but you may lose data in that case (e.g. error before writing to adabas or file).
if you want to work with syncpoint handling there is a backout that you do not want, then you should try to get rid of the backout. so what is causing the backout that you do not want?
to avoid a loop with backout messages you can also check the backoutcounter after getting a message, this will show you if the message has been backed out before and you can do the proper actions in your application program. _________________ Regards, Butcher |
|
Back to top |
|
 |
Mr Butcher |
Posted: Wed Nov 02, 2005 12:51 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
Quote: |
Thanks for your reply on the message. Can you please suggest how to avoid back out of messages to the queue.
What is happening is that ? I read a message from the queue, for some messages based on the content of the message, I am writting into Adabas error file after writing into error file again it is backing out the message. "I donot want to back out the message. Just writte to error file and read the next message from the queue".
Can you please provide a sample code? |
there is no need to continue this thread using private messages, thats why i posted the private message here to continue the thread.
again, my question is: who or what is "it"? if your message is backed out then there is an error or your program does the backout. because you said it is an unwanted backout i assume it is not within your program but its an error that occurs. what error is that? WHAT IS BACKING OUT THE MESSAGE?
we can not help if you dont give us information.
you may also want to read about syncpoint / no syncpoint processing in the application programmers guide and application programmers reference. there are enough samples around that show how to work with these options, check the samples that come with mq. _________________ Regards, Butcher |
|
Back to top |
|
 |
dinotechie |
Posted: Wed Nov 02, 2005 2:14 am Post subject: |
|
|
Newbie
Joined: 02 Nov 2005 Posts: 2
|
Mark Skip backout is bit tricky as it needs two units of work to roll back and it appears you are writing to a VSAM file that is committed irrespective of the syncpoint.
I believe best alternative is to get the message under syncpoint, if there is an error write to the log and if logging is sucessfull then committ otherwsie rollback.
Cheers _________________ dinotechie |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|