The messages themselves contain no state indicating if they were committed as an entire group, nor any state indicating if they must be consumed as a complete group, that is entirely an application decision. As such the channel can't possibly know what messages or segments were put as part of a complete group/message, yet alone know how the messages would be consumed. Even if there were an option requiring the sending channel to only send complete groups, that would violate MQ message ordering guarantees. Why are you concerned about a depth of 700000 messages ?
One of the difficulties in dealing with message groups and segmented messages is how to deal with 'lost' messages/segments. Are these messages persistent? if so then the most common reason for a long term incomplete group woud be if messages are finding their way onto the DLQ.
You state "it sounds like a weird design that sender and receivers do have to respect the message group", but that is not true. Both the senders and receivers can choose whether to only deal in complete groups or not. There's enough rope in the message group and segmentation options with which you could hang yourselves several times over. In the Hursley lab some of the options used to be refered to as "for grown ups only", and you have to be extremely careful if you start to manually fill in the group and segment status. The more friendly MQPMO/MQPMO options do NOT require you to put and receive complete messages, but even these options need you to think very carefully about how any errors would be handled.
Original Message:
Sent: Thu March 16, 2023 12:15 PM
From: Sebastian Wilk
Subject: Message Grouping via Transmissionqueuemanager not working?
Your statement is correct in regards to the maxdepth, and this is also the issue we ran into.
Our local queue has reached the maxdepth but only incomplete message groups were sitting in it, thus the reading application could not consume any of them, resulting in the putting job to park the messages in the SCTQ.
The takeaway we are looking for here is this scenario:
We have 700.000 messages to be put into the target queue, the queue has a capacity fo 50.000
How can we make sure that there are only complete groups in the target queue so that it does not lock itself up?
The obvious choice is to increase the maxdepth (which we already did) but it sounds like a weird design that sender and receivers do have to respect the message group but intraqueuemanagercommunication is able to put and commit a message one by one? This could always lead to the abovementioned situation if the messages exceed the maxdepth of the targetqueue.
I'll have a look at the MQGMO_ALL_MSGS_AVAILABLE option.
------------------------------
Sebastian Wilk
Original Message:
Sent: Thu March 16, 2023 11:18 AM
From: Andrew Hickson
Subject: Message Grouping via Transmissionqueuemanager not working?
The queue manager knows if the sequence of messages (and segments) in the group is complete, regardless of the order in which those messages actually arrive.
With message groups (and segments) you can choose how much help the queue manager gives you in managing the reassembly of messages and whether messages in incomplete groups can be consumed. The option MQGMO_ALL_MSGS_AVAILABLE indicates whether all of the messages in the group must be available before any message in the group is returned.
Channels move message (and segments) individually, they are not concerned with the completeness of the group (for example the channel has no knowledge of how the message will be consumed).
You state "Our assumption was, that the messages can only be committed once the last message in group has been transferred", if this was the case the full set of messages would still need to be on the target queue, and hence MAXDEPTH would need to be high enough to permit this.
So the obvious answer to your question is 'no there is no option to only transmit/commit whole groups', the more intersting thing is what you were actually hoping to achieve if there were ?
What am I missing ?? For example do you have multiple message groups accumulating on the target queue and were hoping not to need MAXDEPTH to be big enough for all of the groups concurrently (not possible I'm afraid). What issue do you anticipate through increasing the max depth on the target queue ?
------------------------------
Andrew Hickson
Original Message:
Sent: Thu March 16, 2023 02:56 AM
From: Sebastian Wilk
Subject: Message Grouping via Transmissionqueuemanager not working?
Hello dear MQ people,
we have the following setup at hand:
A client is sending messages with message grouping being connected to a transmissionqueuemanager, which then relays the messages to the target queuemanager via SCTQ into a local queue.
The problem arises after the messages have been put to the SCTQ and are moved to the local queue: The messages are committed one by one, which leads to a potential problem when the local queue ends up full and no complete message group has been put into the local queue. We tested and verified this, as the reading application will only read completed message groups, which then leads to a softlock.
Our assumption was, that the messages can only be committed once the last message in group has been transferred, but this is not the case here.
Here's a simple illustration:
Is this intended behaviour or are there ways to configure it so that the messages are only committed as a full group when using the above mentioned setup?
Kind regards
Sebastian
------------------------------
Sebastian Wilk
------------------------------