4 Replies Latest reply on Dec 2, 2009 7:23 AM by rnicholson10

    Message Grouping over a Core Bridge

    rnicholson10

      Take the following situation:

      Two machines A and B which are connected via core bridge. On machine A there are two applications, once that sends messages that run insert statements at machine B and another that sends update statements, both apps use the same queue to send. The core bridge is down due to a network issue.

      When the bridge comes back up all the messages are delivered to B. I am finding that all the messages from the update app are processed immediately and fail due to the fact that messages from the create app have not yet been processed. All messages from the create app are grouped.

      Now this is not an issue if the bridge does not go down as the creates occur well before the updates.

      Would the correct solution be to group the update with the same messaging group ID as the creates? Would this force the creates to be delivered to B before the updates?

      To clarify further, let's say the creates are sent at 2 O'Clock, the updates at 3 O'Clock and the bridge is restored at 4 O'Clock, when messages are grouped does the send time define the order in which the messages are delivered?

      Cheers,

      R.

        • 1. Re: Message Grouping over a Core Bridge
          timfox

          I'm not sure I understand your description.

          You have messages in a queue, and you're saying that they getting delivered in the wrong order?

          I'm not sure I understood the relevance of message grouping here...

          • 2. Re: Message Grouping over a Core Bridge
            rnicholson10

            Let's say I'm sending four messages.

            Message 4 depends on message 3, 3 depends on 2, and 2 on 1.

            Therefore 1 must arrive at the remote queue first and be processed, it is then followed by 2, 3 and finally 4. This is how I use grouping, once I send these in the correct order the grouping will ensure that each one is finished before processing the next.

            Now I have a message 5 which depends on 4, but I 'm going to send this 10 minutes after message 4. If the bridge was active this would not be a problem as 1,2,3 and 4 would already be processed off the remote queue. But if the bridge is inactive and message does not have a group id, once the bridge is restored message 5 could be processed before 1,2,3 and 4 (I'm using an MDB).

            • 3. Re: Message Grouping over a Core Bridge
              timfox

              The order that messages are delivered is determined by their order in the queue, not by message grouping.

              So if you send them to a queue in a certain order from a particular producer they will get delivered in a certain order.

              Now, if you have multiple consumers, and want to ensure they are only consumed by one consumer you use message grouping.

              If you have multiple consumers and send messages 1, 2, 3 with the same message group, but send message 4 with a different, or no group then the system will ensure 1, 2, 3 are processed by the same consumer but 4 won't be (since you didn't set the message group).

              This could result in 4 being processed before 1,2,3 . This is non deterministic and depends on how long 1,2 and 3 take to process, and is true whether or not you use a message bridge.

              Does that answer the question?

              • 4. Re: Message Grouping over a Core Bridge
                rnicholson10

                Yes, thank you.