7 Replies Latest reply on Jun 29, 2009 8:56 AM by M B

    Questions on JBoss Messaging 1.4

    M B Newbie

      Dear all,
      I have some questions:

      Q1: How can I override the message header fields from JBoss Messaging 1.4? The reason is that I don't want the clients to control the message expiry and priority information.

      Q2: What's the complete scenario which will cause a message to be moved to the DLQ? Does this happen when the consumer fails to process the message and sends a special acknowledgment as a result?

      Q3: If I configure the server to set the expiration time to any message to infinity (no expiration), do I still need to have a default expiry queue?

      Q4: Is moving a message to a DLQ dependent only on the consumer response? In other words, is there any scenario which will cause the server to move a message to a DLQ without the consumer's intervention?

      Thanks a lot for your time.

        • 1. Re: Questions on JBoss Messaging 1.4
          Yong Hao Gao Master

          Q1 : you can have a look at JBossMessage class.

          Q2 : If a message is failed to be delivered by JBM for a certain times, it will go to DLQ if specified.

          Q3 : no. I don't think you need it if your messages never expire.

          Q4 : see Q2 for reference.

          • 2. Re: Questions on JBoss Messaging 1.4
            M B Newbie

            Thanks gaohoward. I still need some explanations:

            Q1: Is there a configurable way to define default message headers from JBoss?

            Q2: How do you define 'delivery'? Is it delivery between internal components of JBoss? Or is it delivery between external clients and JBoss?

            • 3. Re: Questions on JBoss Messaging 1.4
              Yong Hao Gao Master

              Q1: Is there a configurable way to define default message headers from JBoss?

              --- I don't think it has a way to configure default values for message headers.

              Q2: How do you define 'delivery'? Is it delivery between internal components of JBoss? Or is it delivery between external clients and JBoss?

              -- here the delivery means the process in which messages are sent from JBM server to the clients (consumers).

              • 4. Re: Questions on JBoss Messaging 1.4
                Tim Fox Master

                 

                "gaohoward" wrote:
                Q1: Is there a configurable way to define default message headers from JBoss?

                --- I don't think it has a way to configure default values for message headers.



                Actually you can probably do this by providing an AOP interceptor in JBM 1.x.

                In JBM 2.0 interceptors are fully supported, see the docs for more info.

                • 5. Re: Questions on JBoss Messaging 1.4
                  M B Newbie

                  Another question:

                  I'm using a JMS client to drop messages in JBM 1.4. Although the client is changing the message header properties (expiry and priority), these changes are not taking effects on JBM. For example, the client is setting the message expiry to 1 second but JBM is keeping the message forever in the destination queue without moving it to the expiry queue. Can you help me to understand the reasons?

                  Thanks all.

                  • 6. Re: Questions on JBoss Messaging 1.4
                    Yong Hao Gao Master

                    Hi, I think about those values you should consult JMS spec. Some of them are determined only when the message is sent. for example in the spec


                    JMSPriority
                    The JMSPriority header field contains the message’s priority.
                    When a message is sent, this field is ignored. After completion of the send, it
                    holds the value specified by the method sending the message.


                    That means you need to specify the priority in send() method.


                    • 7. Re: Questions on JBoss Messaging 1.4
                      M B Newbie

                      You're right gaohoward. The priority should be set at the method level (send method) rather than at the message level. But I still can't control the expiry of the message even from the send() method. I will review the specs as you suggested. Thanks.