9 Replies Latest reply on Apr 1, 2004 3:50 AM by tdevos

    Messages only delivered after server restart.

    tdevos

      Hi,

      Platform: Using JBoss-3.2.3 on W2K server with JDK 1.4.2_03.

      I send messages with client A to a JBOSS server. On the server I implemented a service, just a simple java program, which listens on the queue and puts it on another queue depending on the content of the message. Client B listens to the same JBOSS server on the destinationqueue. Everything works fine but sometimes the server keeps its messages on the queue and don`t passes them to client B. I can see this easily when I turn on the filePM. The strange thing is that after a restart of the JBOSS server the messages got delivered immediatly to client B. Has anybody an idea whether this is a bug or do I miss something?

      One more strange thing. If I take a look in the jmx-console it says that there are 0 messages on the queue. However after the restart it gives the correct number of messages.

      Extra information:
      - The clients and the queuerouter both use HTTPConnectionFactory. If I mix 2 protocols, e.g. the clients use HTTPConnectionFactory and the queurouter OIL/UIL or whatever else then this problem is even worse.
      - I also implemented onException and no exceptions occur on both client and server.
      - It is implemented with onMessage (asynchronous)
      - I tried cloning the message instead of just forwarding the message in the router but this also gives the same result.
      - All messages are sended/routed with unlimited timetolive.

      Thanks!

      Tim De Vos

        • 1. How is the cache tied to JMX?
          tdevos

          In Jboss JMX is not only used as a management framework, but also as an invocation layer.

          Is the cache going to be invocable for users via JMX, or is the MBean nearly going to be a wrapper that registers the embedded cache object with JNDI for users.
          Or is a proxy going to be registered to JNDI that patches the invocations to the JMX invocation layer?

          • 2. Re: Messages only delivered after server restart.

            Enable TRACE logging on the server.

            If you are in a test environment, try it with JBoss-3.2.4RC1 which has a lot more
            TRACE logging so you can see what is going on.

            Regards,
            Adrian

            • 3. Re: Messages only delivered after server restart.
              tdevos

              I logged with a trace on JBoss 3.2.3. It`s from a production environment so I was not able to update to 3.2.4RC1 At 10:31 the problem presited again. A message arrived and got not delivered to the client. After a JBoss restart the message was delivered perfectly. If you which I can send you the log file extract (12KB so it`s not that large) to your e-mail address. Don`t want to spam you with this issue ;-)

              Regards,

              Tim De Vos

              • 4. Re: Messages only delivered after server restart.

                If messages are not being delivered to the client, it is likely an error
                has stopped the client consumer. See the FAQ topic for how to enable TRACE
                logging on the client.

                Regards,
                Adrian

                • 5. Re: Messages only delivered after server restart.

                  In fact, you don't even need TRACE logging, you only need log4j configured
                  so you can see the WARN message that reports the error.

                  Regards,
                  Adrian

                  • 6. Re: Messages only delivered after server restart.
                    tdevos

                    I mailed you the logs from the server and client. In fact I don`t think that it is a client problem since only a server reboot solves the problem. Also the JMX-console reports that there are 0 messages on the queue.

                    Tim De Vos

                    • 7. Re: Messages only delivered after server restart.

                      I don't see anything in the logs. Other than some opens and closes.
                      Looks like you'll have to enable TRACE.

                      If the queue is empty, but a restart resends the messages, that means
                      the messages have been delivered to the client but the client has neither
                      acked or nacked them.

                      Restarting the server will recover the unacknowledged messages.

                      Regards,
                      Adrian

                      • 8. Re: Messages only delivered after server restart.

                        Please only send me logs when I ask for them.
                        I don't want my mailbox filling up with everybodys server logs.

                        Your log shows many receive requests, one acknowledgement and some
                        transaction requests. But it is hard to match up. The 3.2.3 transact requests don't
                        show what takes part in the transaction (or even whether it is a commit/rollback).

                        Create a simple example program that reproduces the problem and post the code
                        on the forums. Also try running against 3.2.4RC1 with TRACE enabled, you
                        will get a lot more useful logging. Try to matchup the log with your code so
                        you can understand what is going on.

                        Regards,
                        Adrian

                        • 9. Re: Messages only delivered after server restart.

                          You do know that if you don't commit/rollback JBoss will rollback when the session
                          closes?