Author |
Message
|
techno |
Posted: Tue Jan 18, 2005 1:32 pm Post subject: cluster and batch |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Code: |
Removing message affinities improves the availability of applications. If an
application that has message affinities sends a batch of messages to a queue
manager and the queue manager fails after receiving only part of the batch, the
sending queue manager must wait for it to recover before it can send any more
messages. |
That is from MQ Clusters manual. What is batch here? Is it batch size that is configured in the chl? Or something else. Could somebody let me know? How is this determined?
Last edited by techno on Tue Jan 18, 2005 1:40 pm; edited 1 time in total |
|
Back to top |
|
 |
techno |
Posted: Tue Jan 18, 2005 1:39 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
I looked at mqsc mnaual. Is this the answer to above question?
Code: |
The batch is terminated by whichever of the following occurs first:
v BATCHSZ messages have been sent, or
v The transmission queue is empty and BATCHINT is exceeded
The default value is zero, which means that the batch is terminated as soon
as the transmission queue becomes empty (or the BATCHSZ limit is
reached). |
|
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jan 18, 2005 2:17 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
In this case it's specifically talking about an "affinity batch", to mangle a term or two.
That is, if your application is written so that more than one message is logically tied together (for instance, using grouping or segmentation), then that set of logically tied together messages is the "batch" in question.
The cluster manual is not talking, in this instance, about the channel batch. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Jan 18, 2005 2:18 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
No. In your 1st quote, "batch" is just a group of independent messages (not MQ grouping) that the sending application sends out as Message1, Message2 and Message3.
They are completly indepedent messages. They can be put by any app (not just BATCH on the mainframe).
When you talk about Messages1, 2 and 3, you could say they are a batch of messages. Messages #4,5 and 6 could be another batch. They are physically independent, but logically connected somehow. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
techno |
Posted: Tue Jan 18, 2005 10:13 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
I am confused here. How does MQ knows that certain messages belong to a batch? Or how to make MQ known about batch start and batch end. |
|
Back to top |
|
 |
Nigelg |
Posted: Wed Jan 19, 2005 12:12 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
WMQ does not know about msgs being part of a batch, only the app does. A batch in this context is a logical set of msgs which must go to the same destination. To achieve that in a clustered environment the putting app must add affinities to the msgs, either by opening the cluster queue with MQOO_BIND_ON_OPEN, or by specifying the qmgr name in the MQOD. |
|
Back to top |
|
 |
techno |
Posted: Wed Jan 19, 2005 8:53 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Let's take an example
Opened a cluster queue QUE1 with bind-on-open option. Say that queue is physically (locally) available on two qmgrs QM1 and QM2. QM3 qmgr is also part of cluster.
Put a messsage in QUE1 at QM3. Since QM3 does not have this queue, it either sends QUE1 of QM1 or QM2.
Put Msg1 at 10:10:00 am
Put Msg2 at 10:10:01 am
Put Msg3 at 10:10:02 am
Put Msg4 at 10:15:01 am
Put Msg5 at 10:15:02 am
Put Msg6 at 10:15:03 am
Remember that the queue is opened only once before putting Msg1. What do you think now? Do all above are put into same physical QUE1? (one of QM1 or QM2)
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 19, 2005 9:05 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
techno wrote: |
Let's take an example
Opened a cluster queue QUE1 with bind-on-open option.
|
techno wrote: |
Do all above are put into same physical QUE1? (one of QM1 or QM2) |
What does bind-on-open mean, if not just that?
And the section of the cluster manual that you posted explained exactly WHY bind on open is a bad idea. If, in the middle of this exchange you list, say at 10:11 am, the qm you have bound to (choose QM1 for example), goes down, then the message you put at 10:15 will sit in the SYSTEM.CLUSTER.TRANSMIT.QUEUE until QM1 is back up. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|