5 Replies Latest reply on Nov 13, 2007 7:00 AM by Kevin Conner

    Do I need a JMS queue for every service?

    Torsten Fink Newbie

      Hi,

      this is not an urgent question for help but only a kind of architectural question.

      My current understanding of the JBoss ESB-architecture is that I need a unique bus-configuration-element for each service. If two different services uses the same bus-configuration, they will automatically share messages. (And probably produce errors.)

      This means that in a scenario with a lot of services I have to configure a lot of JMS queues.

      Is it possible to use only one JMS queue or even better only one bus-configuration?

      I could use one JMS queue and create a bus configuration for each service with a specific JMS selector. But I am not sure if can easily filter the JMS messages according their ESB-To-field.

      The simplest solution (from the perspective of an ESB user) would be to use one bus and all services consume only their messages. "Their" means only the messages that are sent to them.

      Any comments, solutions?

      -- Torsten

        • 1. Re: Do I need a JMS queue for every service?
          Burr Sutter Master

          How would one know what "Their" messages are?

          We do support selectors and decent example of that can be found in quickstarts\exceptions_faults. This would essentially allow you to get all your ESB services tied to 2 queues (one for the gateway and one for the native listener).

          Burr

          • 2. Re: Do I need a JMS queue for every service?
            Torsten Fink Newbie

             


            How would one know what "Their" messages are?


            Is the target EPR not part of the native ESB message format? If yes, then automatic dispatching to the target service should be doable for every communication type (i.e. JMS, File etc.).


            We do support selectors and decent example of that can be found in quickstarts\exceptions_faults. This would essentially allow you to get all your ESB services tied to 2 queues (one for the gateway and one for the native listener).


            Thank you for the hint. Yes, this would solve the problem with the queues. Does the ESB always set the JMS-property serviceName to the target service? (I browsed quickly through the ESB sources but could not find the place. I also scanned the quickstart-example and could not find any place where the JMS property is set.)

            It still bloats the ESB configuration a little bit. I have to specify a service-specific bus for every service in the providers section. This means that the service configuration is split into two separate parts of the configuration file. Maybe it would be better to specify the JMS-selector-filter in the listener of the service.

            Of course this is not a big deal. I just try to understand the overall architecture.

            -- Torsten

            • 3. Re: Do I need a JMS queue for every service?
              Kevin Conner Master

               

              "tnfink" wrote:
              Thank you for the hint. Yes, this would solve the problem with the queues. Does the ESB always set the JMS-property serviceName to the target service? (I browsed quickly through the ESB sources but could not find the place. I also scanned the quickstart-example and could not find any place where the JMS property is set.)

              The selector properties are included in the JmsEPR for the service and will be copied verbatim into the JMS message properties before sending. As such you only need to specify them on the service.

              "tnfink" wrote:
              It still bloats the ESB configuration a little bit. I have to specify a service-specific bus for every service in the providers section. This means that the service configuration is split into two separate parts of the configuration file. Maybe it would be better to specify the JMS-selector-filter in the listener of the service.

              You can already do this, the jms-message-filter can be specified within the jms-bus or jms-listener with the jms-listener configuration having the higher precedence.

              Kev

              • 4. Re: Do I need a JMS queue for every service?
                Torsten Fink Newbie

                 


                The selector properties are included in the JmsEPR for the service and will be copied verbatim into the JMS message properties before sending. As such you only need to specify them on the service.


                thanks, that clarifies it. Does the same work for the fs-message-filter?
                (I mean would a service-specific message-filter use its own input suffix?)


                You can already do this, the jms-message-filter can be specified within the jms-bus or jms-listener with the jms-listener configuration having the higher precedence.


                I tried that but the ESB wanted the service-specific jms-message-filter to also specify the dest-name and des-type. And it felt wrong to specify the JNDI name twice, on the bus and on the listener.

                But, I guess, if I can live with this double configuration, I would get what I wanted in the first place: one queue and the configuration of the connector only inside the service configuration.

                Thanks for your time.

                -- Torsten

                • 5. Re: Do I need a JMS queue for every service?
                  Kevin Conner Master

                   

                  "tnfink" wrote:
                  thanks, that clarifies it. Does the same work for the fs-message-filter?
                  (I mean would a service-specific message-filter use its own input suffix?)


                  Yes, these will also be translated into the service EPR and used in a similar manner.

                  Kev