3 Replies Latest reply on Oct 27, 2008 8:16 AM by beve

    Lost connections, temp queues, reconnect?

      Hello,

      I'm forwarding this for a coworker of mine who is experiencing the following behavior.

      A client running on AS 4.2.1 connects to a queue on ESB 4.2.1.
      The queue on the ESB goes down for whatever reason.
      The client notices the disconnect and AS automatically creates a temp queue locally to forward messages to.
      The queue on the ESB comes back up.
      The client does not realize the ESB is back up and doesn’t attempt to reconnect.

      We do not have the option of upgrading versions easily atm so unless I'm told that it's a bug in 4.2.1, I'd prefer a solution based on 4.2.1.

      thx in advance

        • 1. Re: Lost connections, temp queues, reconnect?
          beve

          Hi,

          you can disable the automatic creation of destinations by modifying standardjboss.xml:

          <invoker-proxy-binding>
           <name>message-driven-bean</name>
           <invoker-mbean>default</invoker-mbean>
           <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
           <proxy-factory-config>
           <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
           <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
           <CreateJBossMQDestination>true</CreateJBossMQDestination>
           <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
           <MinimumSize>1</MinimumSize>
           <MaximumSize>15</MaximumSize>
           <KeepAliveMillis>30000</KeepAliveMillis>
           <MaxMessages>1</MaxMessages>
           <MDBConfig>
           <ReconnectIntervalSec>10</ReconnectIntervalSec>
           <DLQConfig>
           <DestinationQueue>queue/DLQ</DestinationQueue>
           <MaxTimesRedelivered>10</MaxTimesRedelivered>
           <TimeToLive>0</TimeToLive>
           </DLQConfig>
           </MDBConfig>
           </proxy-factory-config>
           </invoker-proxy-binding>
          

          Try setting 'CreateJBossMQDestination' to false and the temp queue should not get created.

          Regards,

          /Daniel

          • 2. Re: Lost connections, temp queues, reconnect?

            Hi Daniel,

            Thanks.

            Question though, what happens to outbound messages while the remote queue is down? Will they get queued up until a successful reconnect is done?

            • 3. Re: Lost connections, temp queues, reconnect?
              beve

               

              Question though, what happens to outbound messages while the remote queue is down? Will they get queued up until a successful reconnect is done?

              Do you mean the queue that the client publishes messages to?
              The client will not be able to publish messages in this case as the destination will not be available.

              If you need to have this sort of functionality I think you would need some sort of message bridge, but I don't think that JBossMQ provides one. JBossMessaging does if upgrading is an option.
              You could perhaps use the High Availability(HA) features of JBossMQ for this:
              http://www.jboss.org/community/docs/DOC-10526.

              If you cannot use that, you could have the client publish to a local queue and have an mdb that publishes to the remote queue of the ESB server.
              This way your client will be able to continue processing as the local destination will be available. The mdb will implement the logic for publishing the message and have code for handling failover/retry if the remote destination is not available.

              Regards,

              /Daniel