I have to configure a backout queue for the MQ input node in my application.I created one local queue as a backout queue, but don't know how to assign it.Also, how to check the backout threshold and direct the message to backout queue if the count exceeds.
Using RUNMQSC run the following
ALTER QL(<Q1>) BOQNAME(<BACKQ>) BOTHRESH(<number>)
For example the following sets backout queue BACKQ with a threshold of 5.
ALTER QL(MAINQ) BOQNAME(BACKQ) BOTHRESH(5)
Related
I have 5 input Queues, 5 message flows for each. After some processing messages from all queues go to one transport queue.
Is there a possibility to set a priority across queues, for example messages from input queue 1 will always be processed and put in the transport queue first?
It sounds like you need to set the message priority.
You set the priority of a message (in the Priority field of the MQMD
structure) when you put the message on a queue
... you can create messages having priorities between 0 (the lowest) and 9
(the highest).
Hi use the Sequence Node to done this task.
https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/bc28010_.htm
Just want to confirm the correct way the MQ delivers messages to the MQOutput node. Recently came across a situation where i a felt bit confused. Here is the scenario.
I have a local queue on Qmgr,say(A) which receives messages from applications and have a local broker associated with this qmgr(A) with a message flow deployed, which consumes messsages from this queue and drops it to another local(L.B) queue on Queue manager (B).
To successfully deliver the messages to qmgr(B) do i have to
Create a remote queue definition on Qmgr(A) with transmission queue name matching the remote queue manager name, here(B)
MQOutput node value set as, queue->remote queue definition name on (A) and queue manager value as blank
or
to create only the transmission queue that matches with the name of the remote queue manager name, here(B).
MQOutput node value set as queue-> target local queue (L.B) and Queue manager value as (B).
When i follow with the first process, noticed messages reaching the destination and when i follow with the later one, noticed messages sitting up in the local queue itself.
Is there any necessity to always create 'n' number of remote queue definitions when it needs to drop messages to 'n' number of local queues?
Kindly guide me to better understand this. Thanks in advance to each of you.
There is no necessity to create n remote queue definitions, MQ is happy to accept output marked as destined for "Queue Name" on "Queue Manager Name".
You say that when using method 2. that your messages are "sitting up in the local queue". There are a few things you must check to solve this problem.
I assume the named queue L.B is defined on QMgr B and not QMgr A?
I assume the local queue the messages are sitting on is a transmission queue?
Have you defined a channel to read messages from the transmission queue they are stuck on?
Have you started the channel which should be moving the messages off the transmission queue to QMgr B?
I'm using Weblogic JMS. What I'd like to do is:
a) producer A produces JMS messages and put them on the queue ( groupA )
b) when processing each message from groupA I want to generate another messages ( groupB )
I've got 16 workers to process this messages.
Now, how I can ensure, that all messages from groupA will be processed before any message from groupB ?
A bit late here but hopefully this will help anyone with the same issue. GroupA is effectively an Intermediate Destination. The JMS queue should have the default value of Pass-Through in the Unit-of-Work (UOW) Message Handling Policy setting. As your MDB processes these messages it needs to get the Unit of Work jms properties and reset them on the new message being sent for GroupB. This jms queue should have Unit-of-Work (UOW) Message Handling Policy set to Single Message Delivery. When the messages are received on this jms queue they will not be processed until all messages for a unit of work group are present i.e. all sequence numbers 1,2,3 etc and an end of message identifier. Once they are all present the mdb will consume them as 1 object message and the individual messages will be contained in a List. It is then your job to code to iterate the list and process as you need.
Weblogic Docs here
In MQ explorer, If I open up the properties for a particular queue (X), what property will tell me if the queue is defined as an error handling queue for another queue (Y)? i.e. If Y fails to process the message and the transaction rolls back, it will put the message on X.
Any queue designated as an error or exception queue (backout queue in WebSphere MQ terminology) is an ordinary queue. The BOQNAME on a primary queue points to the backout queue but there is no attribute of the backout queue that points back to the primary queue. This might be a one-to-many relationship because any number of primary queues might point to a single backout queue.
One way to do this in WMQ Explorer would be to make sure that BOQNAME is visible in the display and then sort the queue list on that column. Then look for all instances with your backout queue name in them.
In WAS, I have created a jms queue X. I have also created another queue Y and in MQ, I specify that Y is backout queue for X.
Now for X if I say maximum number of retries :3 and backout threshold is 2, that means that after 2 tries if the message is not consumed by X, queue manager will put message on Y. In this case, maximum number of retries (3) will never be reached because it will never try a third time. And the listener for X will never go down.
Is my understanding correct?
I'm not so sure about the jms interface, but in native WMQ, the queue manager does not automatically requeue the message to the backout queue. it is up to the application to query the backout_count, compare that to the backout_threshold, and put the messages to backout_queue.
You should read "How WebSphere Application Server handles poison messages" -- http://www.ibm.com/developerworks/websphere/library/techarticles/0405_titheridge/0405_titheridge.html
Also important to read "Best Practices: WebSphere MQ shared queues and application programs", scroll down to Issue 6 -- http://www.ibm.com/developerworks/websphere/library/techarticles/0512_elkins/0512_elkins.html
MQ JMS implementation does the job of moving a message to backout queue once the backout threshold set on the target queue is reached. If a backout queue is not specified, MQ JMS attempts to put the message onto the dead letter queue.
There is no retry concept in MQ JMS as far as I know. It might be something related to WAS/MDB.
it is weird that if it is application's decision to requeue the msg to backout queue, why the backout threshold is defined in queue's property ? should't this threshold property be defined in application.
Very confusing.