4 Replies Latest reply on Sep 14, 2005 9:40 AM by Schacher

    jBossMQ - Multiple Dead Letter Queues

    Andy Bowes Newbie

      Hi Guys

      I am using jBoss v4 in development with jBossMQ and we are attempting to mimic our production WebSphere MQ configuration. In the production environment we can define a separate Dead Letter Queue (DLQ) for each Queue and we are using this to monitor/resubmit failed messages and the DLQ that the message arrives on indicates the source of the message.

      Can we acheive the same result in jBossMQ i.e. configure a different DLQ for each Queue as well as a global DLQ? Ideally I need to acheive this without modifying the existing MDBs as I don't really want to go through the whole production rollout cycle to implement a change that is only used in the development environment.

      I know that we should be able to acheive this in jBoss v5 but again that is not really an option at the moment.

      Thanks

        • 1. Re: jBossMQ - Multiple Dead Letter Queues
          Elias Ross Master

          You can define a different MDB deployment strategy in standardjboss.xml and use a different DLQ.

          • 2. Re: jBossMQ - Multiple Dead Letter Queues
            Andy Bowes Newbie

            Thanks for that.

            So I create multiple <invoker-proxy-binding> in the standardjboss.xml that define different DLQs and then associate the MDB with a specific <invoker-proxy-binding> in the jboss.xml. I'll give it a try now.

            • 3. Re: jBossMQ - Multiple Dead Letter Queues
              Rudi Vankeirsbilck Newbie

              I was looking at trying to do the same thing and figured out from the docs that this was the solution so I would very interested to learn how to associate an MDB with a specific <invoker-proxy-binding>.

              I have tried:

               <mbean code="org.jboss.mq.server.jmx.Topic"
               name="jboss.mq.destination:service=Topic,name=CopyMail">
               <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="bluespacepublisher" read="true" write="true" create="true"/>
               <role name="bluespacesubscriber" read="true" write="false" create="true"/>
               </security>
               </attribute>
               <attribute name="invoker-proxy-binding">bluespace-message-driven-bean</attribute>
               </mbean>
              


              where "bluespace-message-driven-bean" is a new <invoker-proxy-binding> i have created in standardjboss.xml:

               <invoker-proxy-binding>
               <name>bluespace-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>
               <MaximumSize>15</MaximumSize>
               <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>
              


              but that is giving me the following error:

              10:42:35,151 INFO [ServiceConfigurator] Problem configuring service jboss.mq.destination:service=Topic,name=CopyMail
              org.jboss.deployment.DeploymentException: No Attribute found with name: invoker-proxy-binding
               at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:338)
               at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:176)
               at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
               at org.jboss.system.ServiceController.install(ServiceController.java:225)
               at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
               at $Proxy4.install(Unknown Source)
               at org.jboss.deployment.SARDeployer.create(SARDeployer.java:183)
               at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
               at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
               at org.jboss.deployment.MainDeployer.create(MainDeployer.java:778)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
               at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
               at $Proxy6.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
               at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
               at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
               at $Proxy0.start(Unknown Source)
               at org.jboss.system.ServiceController.start(ServiceController.java:394)
               at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
               at $Proxy4.start(Unknown Source)
               at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
               at $Proxy5.deploy(Unknown Source)
               at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
               at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
               at org.jboss.Main.boot(Main.java:150)
               at org.jboss.Main$1.run(Main.java:395)
               at java.lang.Thread.run(Thread.java:552)
              


              I would appreciate some help on this.

              Many thanks,

              Rudi.

              • 4. Re: jBossMQ - Multiple Dead Letter Queues
                Schacher Newbie

                this is working:

                jboss.xml

                 <jboss>
                 <enterprise-beans>
                 <secure>false</secure>
                 <message-driven>
                 <ejb-name>DocImportProcessorEJB</ejb-name>
                 <local-jndi-name>local/DocImportProcessorEJB</local-jndi-name>
                 <destination-jndi-name>queue/eManager-docImportQueue
                 </destination-jndi-name>
                 <resource-ref>
                 <res-ref-name>jms/QueueFactory</res-ref-name>
                 <jndi-name>java:/JmsXA</jndi-name>
                 </resource-ref>
                 <mdb-user>emanager1</mdb-user>
                 <mdb-passwd>emanager1</mdb-passwd>
                 <invoker-bindings>
                 <invoker>
                 <invoker-proxy-binding-name>message-driven-bean-docimport
                 </invoker-proxy-binding-name>
                 </invoker>
                 </invoker-bindings>
                 </message-driven>
                 </enterprise-beans>
                </jboss>
                


                standardjboss.xml:
                 <invoker-proxy-binding>
                 <name>message-driven-bean-docimport</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/DLQDocimport</DestinationQueue>
                 <MaxTimesRedelivered>10</MaxTimesRedelivered>
                 <TimeToLive>0</TimeToLive>
                 <DLQUser>emanager1</DLQUser>
                 <DLQPassword>emanager1</DLQPassword>
                 </DLQConfig>
                 </MDBConfig>
                 </proxy-factory-config>
                 </invoker-proxy-binding>
                
                


                (but im not very happy because i have to define a separate invoker-proxy-binding for every queue (resp. processor). is this realy the way to do it?)

                regards
                marc