5 Replies Latest reply on May 27, 2007 10:02 PM by jazir1979

    Configure queues/topics at application level, Possible?

    jaikiran

      Hi,
      Can we configure queues/topics per application, instead of per app server. What i mean is:

      - Consider a case where i have 2 applications deployed and both want to configure a queue name MyQueue.
      - One app has a MDB name MDB1 and the other app has a MDB named MDB2 and both listen on the queue MyQueue.
      - However, i do not want MDB1 to receive messages meant for MDB2 and vice versa.
      - I know, message selectors might be a option in this case.

      But, broadly my question is can queues/topics be configured in such a way that they are visible *only* in the application in which they are deployed?

        • 1. Re: Configure queues/topics at application level, Possible?
          jaikiran

          Anyone from jboss team?

          • 2. Re: Configure queues/topics at application level, Possible?
            genman

            I'm not really from the team. What it sounds like is you want two copies of JBossMQ running in the same JBoss instance. Which is possible, but probably a bit complicated to set up, especially for MDBs.

            Why can't you create two queues called MyQueue1 and MyQueue2 ?

            Alternatively, use a topic and message selector.

            • 3. Re: Configure queues/topics at application level, Possible?
              jaikiran

              Thank you genman, for sharing your thoughts.

              Why can't you create two queues called MyQueue1 and MyQueue2 ?


              I can very well do that and that is going to work without any issues.

              But, we do have a requirement where we need to deploy 2 applications which listen on a queue with the same name. The issue here is that i have to set different configurations on the queue depending on the application(one configuration setting is the SecurityConf on the queue). It's something like, for app1 the queue with name ABC with require a different configuration and for app2 the same queue will require a different configuration.

              So far it appears that this is not possible. So am thinking of using 2 different queues in these 2 applications(this would require some changes in the code of the applications, though). Isnt this kind of requirement of having queues isolated at application level, encountered ever before?

              Any suggestions are welcome.




              • 4. Re: Configure queues/topics at application level, Possible?
                jazir1979


                This is causing me grief, because we want two different versions of the same app deployed into the same JBoss instance.

                I have it all working, with two different web context-roots and two loader-repository names which isolates the EJBs just fine.

                But if I need different queue names for different instances of my EAR, it will be a real pain, as the queue name is referenced by clients and in the EAR config.

                Is there really no way to make queues application-level?

                "jaikiran" wrote:
                Thank you genman, for sharing your thoughts.

                Why can't you create two queues called MyQueue1 and MyQueue2 ?


                I can very well do that and that is going to work without any issues.

                But, we do have a requirement where we need to deploy 2 applications which listen on a queue with the same name. The issue here is that i have to set different configurations on the queue depending on the application(one configuration setting is the SecurityConf on the queue). It's something like, for app1 the queue with name ABC with require a different configuration and for app2 the same queue will require a different configuration.

                So far it appears that this is not possible. So am thinking of using 2 different queues in these 2 applications(this would require some changes in the code of the applications, though). Isnt this kind of requirement of having queues isolated at application level, encountered ever before?

                Any suggestions are welcome.




                • 5. Re: Configure queues/topics at application level, Possible?
                  jazir1979


                  Well, after thinking about it, I guess this makes perfect sense. If you had a remote client, or a client outside of your app, there'd be no way to know which queue/application it intended to send the message to.

                  So, ignore this ;)

                  "jazir1979" wrote:

                  This is causing me grief, because we want two different versions of the same app deployed into the same JBoss instance.

                  I have it all working, with two different web context-roots and two loader-repository names which isolates the EJBs just fine.

                  But if I need different queue names for different instances of my EAR, it will be a real pain, as the queue name is referenced by clients and in the EAR config.

                  Is there really no way to make queues application-level?

                  "jaikiran" wrote:
                  Thank you genman, for sharing your thoughts.

                  Why can't you create two queues called MyQueue1 and MyQueue2 ?


                  I can very well do that and that is going to work without any issues.

                  But, we do have a requirement where we need to deploy 2 applications which listen on a queue with the same name. The issue here is that i have to set different configurations on the queue depending on the application(one configuration setting is the SecurityConf on the queue). It's something like, for app1 the queue with name ABC with require a different configuration and for app2 the same queue will require a different configuration.

                  So far it appears that this is not possible. So am thinking of using 2 different queues in these 2 applications(this would require some changes in the code of the applications, though). Isnt this kind of requirement of having queues isolated at application level, encountered ever before?

                  Any suggestions are welcome.