6 Replies Latest reply on Jul 7, 2008 11:22 AM by ataylor

    Messages was not delivered

    slogger

      Hi gurus!!!

      I have two machines with JBOSS 4.2.1.

      OS Windows XP
      jdk 1.5 (build 1.5.0_13-b05)
      JBMessaging 1.4.0 SP3
      JBRemoting 2.2.2 SP7

      JMS provider was installed on only one machine and uses RDMS Oracle 10.2.0.

      The second machine is just remote client. Message delivery was organized synchronously periodically in EJBTimer

      (QueueReceiver::receive(timeout))

      I am using Bean Managed Transaction and transacted queue session (connection.createQueueSession(true, 0))

      Closing connection calling in finally block.

      I am testing work stability under unstable network connection and unplugging network cable from jms cleint's machine periodically

      After some time I get message on console (as an example):

      2008-07-03 09:57:14,437 WARN [org.jboss.jms.client.container.ClientConsumer] Timed out waiting for last delivery 4 got -1


      This message appears periodically in closing connection time (in my opinion).
      After some time this message is not appeared, but meesages stay in queue table (jbm_msg) and is not delivering at all.

      During of this timer continue work successfully and periodically creates session, attempts to receive messages and close connection.

      There are not error messages on console.

      A versions of JBMessaging and JBRemoting is identical on jms-provider and client machines.

      After restart Jboss on client machine or Jboss whith Jms-provider the message delivering was started succesfully.

      What do this message means and How can I resolve this problem?

      Thanks in advance!

        • 1. Messages was not delivered
          slogger

          Additional info:

          I am using jms resource adapter and External JNDI on client:

          
          <connection-factories>
          
           <!-- ==================================================================== -->
           <!-- JMS Stuff -->
           <!-- ==================================================================== -->
          
           <!-- The JMS provider loader -->
           <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
           name="jboss.messaging:service=JMSProviderLoader,name=JMSProviderRemote">
           <attribute name="ProviderName">RemoteJMSProvider</attribute>
           <attribute name="ProviderAdapterClass">
           org.jboss.jms.jndi.JNDIProviderAdapter
           </attribute>
           <!-- The combined connection factory -->
           <attribute name="FactoryRef">XAConnectionFactory</attribute>
           <!-- The queue connection factory -->
           <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
           <!-- The topic factory -->
           <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
           <!-- Uncomment to use HAJNDI to access JMS-->
           <attribute name="Properties">
           java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
           java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
           java.naming.provider.url=10.0.0.166:1199
           </attribute>
           </mbean>
          
           <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"
           name="jboss.messaging:service=ServerSessionPoolMBean,name=StdJMSPool">
           <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
           <attribute name="PoolName">StdJMSPool</attribute>
           <attribute name="PoolFactoryClass">
           org.jboss.jms.asf.StdServerSessionPoolFactory
           </attribute>
           </mbean>
          
           <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
           <tx-connection-factory>
           <jndi-name>JmsXA</jndi-name>
           <xa-transaction/>
           <rar-name>jms-ra.rar</rar-name>
           <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
           <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
           <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/RemoteJMSProvider</config-property>
           <min-pool-size>10</min-pool-size>
           <max-pool-size>50</max-pool-size>
           <application-managed-security/>
           </tx-connection-factory>
          
           <mbean code="org.jboss.naming.ExternalContext" name="jboss.jndi:service=ExternalContext,jndiName=remoteJndi">
           <attribute name="JndiName">remoteJndi</attribute>
           <attribute name="Properties">
           java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
           java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
           java.naming.provider.url=jnp://10.0.0.166:1199
           </attribute>
           <attribute name="InitialContext">javax.naming.InitialContext</attribute>
           <depends>jboss:service=Naming</depends>
           </mbean>
          
          </connection-factories>
          
          


          • 2. Re: Messages was not delivered
            ataylor

            I'm not really sure what you're problem is, obviously if you unplug the network this will cause errors on either the client or server.

            JBM works by sending messages to a client side buffer from which the client will consume messages from. This is for performance reasons. If you close the connection the consumer will wait to receive any messages that are still in the client side buffer, if at this point the server is unreachable the client will probably timeout waiting to ack the messages.

            • 3. Re: Messages was not delivered
              slogger

               

              "ataylor" wrote:
              I'm not really sure what you're problem is, obviously if you unplug the network this will cause errors on either the client or server.

              JBM works by sending messages to a client side buffer from which the client will consume messages from. This is for performance reasons. If you close the connection the consumer will wait to receive any messages that are still in the client side buffer, if at this point the server is unreachable the client will probably timeout waiting to ack the messages.



              Hi, Andy!
              Thank you very much for answer!

              Yes, it throws exception like 'connection reset', but after this 'WARN [org.jboss.jms.client.container.ClientConsumer] Timed out waiting for
              last delivery 4 got -1 ' issued and messages delivering is not working :-0(.

              Did feature request http://jira.jboss.com/jira/browse/JBREM-891 fix this problem?

              Please, sorry my English!

              • 4. Re: Messages was not delivered
                ataylor

                Again, i'm not sure what your problem is, I would expect these errors when unplugging a network cable.

                • 5. Re: Messages was not delivered
                  slogger

                   

                  "ataylor" wrote:
                  Again, i'm not sure what your problem is, I would expect these errors when unplugging a network cable.


                  It necessary for us to provide correctness of work on unstable network connections and recovery of delivering after losing connection.

                  I was found like one in http://jira.jboss.com/jira/browse/JBREM-947. It is solution of this problem?


                  • 6. Re: Messages was not delivered
                    ataylor

                    JBM supports failover when clients lose connection to a node. This is all documented in the user docs. http://www.jboss.org/jbossmessaging/docs/index.html