Author |
Message
|
hartley |
Posted: Tue Jun 10, 2008 1:38 am Post subject: Batching MQ PUTs |
|
|
Novice
Joined: 09 Jun 2008 Posts: 10
|
Hi
Is there a way to send a number of MQMessages to the broker in one round trip? (I don't mean embedding a number of messages inside one MQ message.)
Thanks,
Hartley |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 10, 2008 1:57 am Post subject: Re: Batching MQ PUTs |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hartley wrote: |
Is there a way to send a number of MQMessages to the broker in one round trip? (I don't mean embedding a number of messages inside one MQ message.)
|
Then what do you mean?
And how does it differ from the channel batching MQ does automatically?
And why would you want to deliver messages in batches (I'm guessing here you're mimicing a file of records)? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
hartley |
Posted: Tue Jun 10, 2008 2:09 am Post subject: |
|
|
Novice
Joined: 09 Jun 2008 Posts: 10
|
Hi Vitor
I meant to save round trips i.e instead of me embedding my own message A inside a single MQMessage, getting MQ client to batch the MQMessage sending. In contrast to me embedding an array of messages A[] inside a MQMessage. On the Get side, there's lots of processes servicing the queue and so I don't want them to receive a batch of jobs which would effectively serialize their processing.
Didn't realise the channel batched automatically so apologies for that and thanks for pointing that out. I will follow that info but a reference would be much appreciated.
Hartley |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 10, 2008 2:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
The client connection is syncronous, so all MQ messgaes are sent immediately to the server and a reply returned. This has nothing to do with how any process is reading them from the queue.
An MQ Message should contain one single business transaction and I don't see the point you're making about serialise processing. Even if you did dump a batch of messages on the queue, they'd still be processed in parallel if you have multiple reading processes. If the messages need to be processed as a group, use the inbuilt group processing.
The channel parameters, batching, grouping and other facilities are described in the Info Center. There's a link at the top of this page. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
hartley |
Posted: Tue Jun 10, 2008 9:01 am Post subject: |
|
|
Novice
Joined: 09 Jun 2008 Posts: 10
|
Apologies - my wording was ambiguous. I do not want the reading processes to receive a set of data as this means that they would be processing each piece of data serially - this would happen if I embedded more than one *within* an MQMessage. That's why I was asking about the other option to avoid round trips from the client perspective i.e batching up multiple MQMessages instead.
Thanks for your responses though - MCA and XMitQ are the keys and I can take a look at 'group processing' to widen my knowledge too!
H |
|
Back to top |
|
 |
|