5 Replies Latest reply on Dec 22, 2003 1:10 PM by adrian.brock

    A problem with temporary queues

    arabin

      I have two applications - A and B.

      Application A does the following in a loop (long long loop, millions of iterations):
      1. It uses a temporary queue from a pool
      2. It creates a message, setting reply_to field to that temporary queue.
      3. It sends the message to a permanent queue, which is listened by application B.
      4. It is waiting for response from application B to the temporary queue. The responce can time-out.
      5. it is putting the temporary queue back to the pool

      Application B receives the message that A sent to it, and sends it back to A, to the temporary queue A enclosed with the message.

      It looks like randomly with probabilty of about 1/10000 application A in the loop times out without getting response from B, even though regular response time is about 1 millisecond, but the timeout is about 60 seconds. If that is the case, application A can repeate p.4 again, immediately after it timed out. Then it really gets the response from B immediately. And it gets the right message.

      Does anybody know anything about this random bug? Is there any kind of fixing it instead of workaround that I suggested?

        • 1. Re: A problem with temporary queues
          genman


          Please include the details (JBoss release #, JMS configuration settings, JDK etc), and a test case. If you have all of this data, you are probably better off filing a bug than posting here.

          • 2. Re: A problem with temporary queues
            arabin

            JBoss 3.2.2RC3
            JVM 1.4.2_01-b06
            Windowx XP
            Sorry, it is difficult to do a test case - it ia s part of a large application

            • 3. Re: A problem with temporary queues
              arabin

              jbossmq-destination-service.xml:

              <?xml version="1.0" encoding="UTF-8"?>
              
              <!-- $Id: jbossmq-destinations-service.xml,v 1.4 2003/10/31 20:57:28 arabinowitz Exp $ -->
              
              <!--
               | This file defines the default Queues and Topics that JBossMQ
               | ships with. The default Queues and Topics are used by the
               | JBoss test suite and by the sample jms programs.
               |
               | You can add other destinations to this file, or you can create other
               | *-service.xml files to contain your application's destinations.
               -->
              
              <server>
               <!-- Destination without a configured SecurityManager or without a
               a SecurityConf will default to role guest with read=true, write=true,
               create=false.
               -->
               <mbean code="org.jboss.mq.server.jmx.Topic"
               name="jboss.mq.destination:service=Topic,name=testTopic">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
               <attribute name="SecurityConf">
               <security>
               <role name="guest" read="true" write="true"/>
               <role name="publisher" read="true" write="true" create="false"/>
               <role name="durpublisher" read="true" write="true" create="true"/>
               </security>
               </attribute>
               </mbean>
              
               <mbean code="org.jboss.mq.server.jmx.Topic"
               name="jboss.mq.destination:service=Topic,name=securedTopic">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
               <attribute name="SecurityConf">
               <security>
               <role name="publisher" read="true" write="true" create="false"/>
               </security>
               </attribute>
               </mbean>
              
               <mbean code="org.jboss.mq.server.jmx.Topic"
               name="jboss.mq.destination:service=Topic,name=testDurableTopic">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
               <attribute name="SecurityConf">
               <security>
               <role name="guest" read="true" write="true"/>
               <role name="publisher" read="true" write="true" create="false"/>
               <role name="durpublisher" read="true" write="true" create="true"/>
               </security>
               </attribute>
               </mbean>
              
               <mbean code="org.jboss.mq.server.jmx.Queue"
               name="jboss.mq.destination:service=Queue,name=testQueue">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
               <attribute name="SecurityConf">
               <security>
               <role name="guest" read="true" write="true"/>
               <role name="publisher" read="true" write="true" create="false"/>
               <role name="noacc" read="false" write="false" create="false"/>
               </security>
               </attribute>
               </mbean>
              
               <mbean code="org.jboss.mq.server.jmx.Queue"
               name="jboss.mq.destination:service=Queue,name=localhost">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
               <attribute name="SecurityConf">
               <security>
               <role name="guest" read="true" write="true"/>
               <role name="publisher" read="true" write="true" create="false"/>
               <role name="noacc" read="false" write="false" create="false"/>
               </security>
               </attribute>
               </mbean>
              
               <mbean code="org.jboss.mq.server.jmx.Queue"
               name="jboss.mq.destination:service=Queue,name=A">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               </mbean>
               <mbean code="org.jboss.mq.server.jmx.Queue"
               name="jboss.mq.destination:service=Queue,name=B">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               </mbean>
               <mbean code="org.jboss.mq.server.jmx.Queue"
               name="jboss.mq.destination:service=Queue,name=C">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               </mbean>
               <mbean code="org.jboss.mq.server.jmx.Queue"
               name="jboss.mq.destination:service=Queue,name=D">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               </mbean>
               <mbean code="org.jboss.mq.server.jmx.Queue"
               name="jboss.mq.destination:service=Queue,name=ex">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               </mbean>
              
              </server>
              

              jbossmq-service.xml:
              <?xml version="1.0" encoding="UTF-8"?>
              
              <!-- $Id: jbossmq-service.xml,v 1.2 2003/10/27 15:44:50 arabinowitz Exp $ -->
              
              <server>
              
               <!-- ==================================================================== -->
               <!-- JBossMQ -->
               <!-- ==================================================================== -->
              
              <!-- Used for backwards compatability with JBossMQ versions before 1.0.0 -->
              <mbean code="org.jboss.naming.NamingAlias" name="DefaultDomain:service=NamingAlias,fromName=QueueConnectionFactory">
              
               <attribute name="ToName">UIL2XAConnectionFactory</attribute>
               <attribute name="FromName">QueueConnectionFactory</attribute>
              </mbean>
              <mbean code="org.jboss.naming.NamingAlias" name="DefaultDomain:service=NamingAlias,fromName=TopicConnectionFactory">
              
               <attribute name="ToName">UIL2XAConnectionFactory</attribute>
               <attribute name="FromName">TopicConnectionFactory</attribute>
              </mbean>
               <!-- ==================================================================== -->
               <!-- JBossMQ Interceptor chain configuration -->
               <!-- ==================================================================== -->
               <!-- To tune performance, you can have the Invoker skip over the TracingInterceptor -->
               <!-- and/or the SecurityManager, but then you loose the ability to trace and/or enforce security. -->
               <mbean code="org.jboss.mq.server.jmx.Invoker" name="jboss.mq:service=Invoker">
               <depends optional-attribute-name="NextInterceptor">jboss.mq:service=TracingInterceptor</depends>
               </mbean>
              
               <mbean code="org.jboss.mq.server.jmx.InterceptorLoader" name="jboss.mq:service=TracingInterceptor">
               <attribute name="InterceptorClass">org.jboss.mq.server.TracingInterceptor</attribute>
               <depends optional-attribute-name="NextInterceptor">jboss.mq:service=SecurityManager</depends>
               </mbean>
              
               <mbean code="org.jboss.mq.security.SecurityManager" name="jboss.mq:service=SecurityManager">
               <attribute name="DefaultSecurityConfig">
               <security>
               <role name="guest" read="true" write="true" create="true"/>
               </security>
               </attribute>
               <depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager</depends>
               </mbean>
              
               <!--
               | The ClientMonitorInterceptor disconnects clients that have been idle for to long.
               | This interceptor is not enabled by default since the server might disconnect clients
               | when the it is under high load.
               -->
               <!--
               <mbean code="org.jboss.mq.server.jmx.ClientMonitorInterceptor" name="jboss.mq:service=ClientMonitorInterceptor">
               <attribute name="ClientTimeout">80000</attribute>
               <depends optional-attribute-name="NextInterceptor">jboss.mq:service=ClientReconnectInterceptor</depends>
               </mbean>
               -->
              
               <!--
               | The ClientReconnectInterceptor is used to allow a client to connect to the server even
               | if it's clientID is allready being used by another client. This interceptor will disconnect
               | the previously connected client to allow the new connection to succeed. This is not enabled
               | by default since the JMS spec states that the 2nd client connecting to the server with the same
               | id should get an exception.
               -->
               <!--
               <mbean code="org.jboss.mq.server.jmx.InterceptorLoader" name="jboss.mq:service=ClientReconnectInterceptor">
               <attribute name="InterceptorClass">org.jboss.mq.server.ClientReconnectInterceptor</attribute>
               <depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager</depends>
               </mbean>
               -->
              
               <!-- ==================================================================== -->
               <!-- The state manager -->
               <!-- ==================================================================== -->
              
               <!--
               | The StateManager is used to keep JMS persistent state data.
               | For example: what durable subscriptions are active.
               -->
               <mbean code="org.jboss.mq.sm.file.DynamicStateManager"
               name="jboss.mq:service=StateManager">
               <!-- This file is pulled from the configuration URL of the server -->
               <attribute name="StateFile">jbossmq-state.xml</attribute>
               </mbean>
              
               <!-- ==================================================================== -->
               <!-- System Destinations -->
               <!-- ==================================================================== -->
              
               <!-- Dead Letter Queue -->
               <mbean code="org.jboss.mq.server.jmx.Queue"
               name="jboss.mq.destination:service=Queue,name=DLQ">
               <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
               <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
               </mbean>
              
              </server>
              



              • 4. Re: A problem with temporary queues
                arabin

                Oops. It eats the rest of the file.
                I do not know how to show it, but it is not really important.

                • 5. Re: A problem with temporary queues

                  Enable trace logging for org.jboss.mq and post
                  the log snippet from when this happens along with the details of the queue name.

                  Regards,
                  Adrian