3 Replies Latest reply on Aug 12, 2009 5:44 AM by timfox

    How to know message's send order?

      In JBM-1.4.2.GA-SP1, how to know two messages' send order?

      I find that message's timestamp property is NOT the order, but how to judge?

        • 1. Re: How to know message's send order?
          bershath27

          I'm afraid that I understand your query. Can you elaborate on this please ?

          • 2. Re: How to know message's send order?

            My code is:

            Message message = consumer.receive(1);
            


            I got 2 messages by order: msg1, msg2, I find sometimes msg1.getJMSTimestamp() > msg2.getTimestamp(), but I send msg1 before msg2.

            I refer to the source of JBM-1.4.2, maybe jbm query the queue order by "ORD", which is a field of jbm_msg_ref table, but I cannot got it.

            Is there anyway to determine whether I send msg1 before msg2?

            • 3. Re: How to know message's send order?
              timfox

              A message's timestamp is set on the *client side* before it is sent, not by the server.

              The order messages are put in a queue are the order they are received on the server.

              So, there's no guarantee that messages in a queue will be in order of timestamp.