IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Confusion on Backout MQ


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srinut123

New User


Joined: 11 Oct 2005
Posts: 62
Location: India

PostPosted: Thu May 31, 2012 1:57 pm
Reply with quote

Hi,
I've some confusion on Backout MQ. Can anyone please clarify this?

I've a trigger MQ with backout threshold limit set to '3'. If the trigger program fails for some reason and doesn't consume the message, the transaction is getting retriggered. I thought the retriggering happens for "3" times and then then message will be moved to Backout queue automatically but that is not happening. The transaction getting triggered more than "3" times and going into loop, infact until I removed the message from trigger MQ the MQ has been triggering the transaction.

Is it the application program responsibility to move the message to backout queue or it is moved automatically?
If application program's responsibility, whats the purpose of delcaring backout queue name in Trigger MQ definition?

If program abends as soon it enters, program can't handle the backout count even, how to stop looping in this case?

Thanks
Sri
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu May 31, 2012 2:07 pm
Reply with quote

What is Backout queue ? Are you talking about DEAD LETTER QUEUE?

What is your triggger type ??
Back to top
View user's profile Send private message
srinut123

New User


Joined: 11 Oct 2005
Posts: 62
Location: India

PostPosted: Thu May 31, 2012 2:33 pm
Reply with quote

No, I dont mean "DEAD LETTER QUEUE". Trigger type is "F". I'm talking about the "Backout requeue name" mentioned in the queue properties shown below.

More: -
Queue name . . . . . . . . : TEST.QUEUE
Disposition . . . . . . . . : QMGR VST1

Backout Reporting
Backout threshold . . . : 3 0 - 999999999
Harden backout counter . : N Y=Yes, N=No
Backout requeue name . . : TEST.QUEUE.BACKOUT

Retention interval . . . . : 999999999 0 - 999999999 hours

Monitoring . . . . . . . . : Q Q=Qmgr, L=Low, M=Medium, H=High, O=Off
Accounting . . . . . . . . : Q E=Enabled, D=Disabled, Q=Qmgr
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu May 31, 2012 3:13 pm
Reply with quote

One thing is that trigger type 'F' (FIRST) could cause an infinite loop

Because

The program which executes MQ ( I assume you do a MQGET ) fails due to some reason and you rollback the operation and hence what happens is that the message which was got back writes again to you inputqueue

As it is first it would trigger you program again and again

Try changing the trigger type to every ( It would resolve you infinite loop )
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri Jun 01, 2012 2:32 pm
Reply with quote

Quote:
If program abends as soon it enters, program can't handle the backout count even, how to stop looping in this case?


If the program abends as soon as it enters, it isn't getting as far as the MQGET so the backout count doesn't get incremented. This would explain multiple triggers and a failure to put the message on the backout requeue queue after 3 triggerings.

In this case the program needs to be fixed so it can at least get as far as the MQGET and the backout count checks.

Garry.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Jun 14, 2012 12:34 am
Reply with quote

I was wrong earlier

The Trigger type FIRST has nothing to do with looping but since the backout set up was not done properLy you might face looping

Also in Mq v6 I am not sure if you can acieve backout automatically in this or higher version

What you might need to check for is when your program fails after getting from trigger queue and when Abend you might issue a syncpoint rollback so as said earlier the message got from the queue is Fed back to input queue so your program executes again and again

So this what you might need to do


In your program after MQGET check for backout count and threshold count

Set the threshold count as 2 in your get para

so you need to check in get para if backout count > threshold

When yes the record which was go needs to put to error queue and do a execute cics syncpoint

So for error scenarios the failed record will be written to error queue and on commit (syncpoint) your backout count initializes to 0

Hence ensuring successful backout and no looping occurs ,

And ensure your trigger type is F

This is concluded after sever test runs

This was much simpler for me

There might be a much simpler solution if that could be done at the time of trigger definition

Not pretty sure

I know I am replying pretty late on this though ( If you are still figuring out it might help or it will help others ) icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Confusion regarding length of SQLCA v... DB2 4
No new posts OLDS frozen in BACKOUT status when On... IMS DB/DC 3
No new posts Confusion b/w index and subscript Mainframe Interview Questions 7
No new posts Confusion while passing data to a cal... COBOL Programming 5
No new posts SuperC comparison confusion TSO/ISPF 1
Search our Forums:

Back to Top