1 2 Previous Next 17 Replies Latest reply on Jul 26, 2007 10:40 AM by rukus

    2 queues on 2 servers

    rukus

      Good day!
      There is 2 servers with esb... i need to put message in queue1 on comp1 and then receive it from queue2 on comp2. (or i can create alias for queue2 from comp2?)
      I saw bridge example and as far as i understand it is some kind of stanalone application?
      I thought this feature might be implemented in Core?

        • 1. Re: 2 queues on 2 servers
          marklittle

          Have you checked out the quickstarts?

          • 2. Re: 2 queues on 2 servers
            rukus

             

            "mark.little@jboss.com" wrote:
            Have you checked out the quickstarts?

            yep - if i miss example which can help me please let me know

            • 3. Re: 2 queues on 2 servers
              burrsutter

              There are a number of examples that move messages from one queue to another. They tend to be more advanced than a simple copy of a message, a simple bridge. However, you can reduce them to something that simple.

              Look at the following quickstarts in 4.2MR2:
              simple_cbr
              fun_cbr
              aggregator

              In SVN:
              wiretap
              recipient_list

              Note: there is a notifier that can push a message to a JMS queue. However, it is often really easy for you to build your own custom action that places the message in the queue exactly the way you want it.

              • 4. Re: 2 queues on 2 servers
                kurtstam

                I want to add that the ESB does not care where the JMS provider is, and you can have multiple (JBossMQ, JBossMessaging, OracleAQ, MQSeries, ActiveMQ) so you can use the ESB as a messaging bridge too.

                --Kurt

                • 5. Re: 2 queues on 2 servers
                  rukus

                  Thanks for answers!
                  burrsutter in those examples i found some interesting things but i think they won't help me (maybe StaticRounting? i need some time to learn what is it exactly)

                  Main problem is how to put message in queue on server 1 and then receive it from queue on server 2...
                  In examples there is routing within the one server :(

                  • 6. Re: 2 queues on 2 servers
                    burrsutter

                    So lets say you have 2 machines, each running a JMS provider:
                    Machine A is running JBoss MQ within JBoss AS
                    Machine B is running ActiveMQ standalone (no app server, no Tomcat, etc)

                    You can easily have the ESB (standalone, ESB Server or ESB within AS) receive a message on Machine A, by running on Machine A, and push that message to a queue on Machine B.

                    Is this closer to your scenario?

                    quickstart static_router is based on ftp but it is all JBoss ESB Actions are protocol agnostic:

                     <actions>
                     <action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter">
                     <property name="destinations">
                     <route-to service-category="category01" service-name="service01" />
                     <route-to service-category="category02" service-name="service02" />
                     <route-to service-category="category03" service-name="service03" />
                     </property>
                     </action>
                     </actions>
                    


                    • 7. Re: 2 queues on 2 servers
                      rukus

                      Yep - it is much closer (but let's imagine what we have only JBOSS ESB on servers - not ActiveMQ or others)

                      so for example

                      <actions>
                       <action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter">
                       <property name="destinations">
                       <route-to service-category="category01" service-name="service01" />
                       </property>
                       </action>
                       </actions>

                      i left 1 route - what configuration should have service01 and category01 to push messages to Machine B?? (this is the main question i think)

                      • 8. Re: 2 queues on 2 servers
                        burrsutter

                        OK.
                        Server 1 has ESB Server running which contains a the JBoss Messaging broker.

                        Server 2 has another ESB Server.

                        You need the 2nd instance of the ESB Server on Server 2 to share the same registry as Server 1.

                        Kurt is our expert on jUDDI setup but here are my initial thoughts:
                        Look at esb.juddi.properties in
                        jbossesb-server-4.2MR2\server\default\deploy\jbossesb.sar
                        Note: change "localhost:8080" to the other server's host name.

                        That is all the info that I have as I've not tested this particular configuration before.

                        Burr

                        • 9. Re: 2 queues on 2 servers
                          bernard.tison

                          rukus,

                          apart from sharing the registry between the JBoss, you will also have to define the jms providers to point to different queues on different machines.
                          So the providers section your esb.config could look like:
                          (replace server1 and server2 by the IP addresses or dns names of your machines)

                           <providers>
                           <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
                           jndi-URL="jnp://server1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
                           jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
                          
                           <jms-bus busid="EsbChannel1">
                           <jms-message-filter
                           dest-type="QUEUE"
                           dest-name="queue/myQueue1"
                           />
                           </jms-bus>
                          
                           </jms-provider>
                           <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
                           jndi-URL="jnp://server2:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
                           jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
                          
                           <jms-bus busid="EsbChannel2">
                           <jms-message-filter
                           dest-type="QUEUE"
                           dest-name="queue/MyQueue2"
                           />
                           </jms-bus>
                          
                           </jms-provider>
                           </providers>
                          


                          • 10. Re: 2 queues on 2 servers
                            rukus

                             

                            "bernard.tison" wrote:
                            rukus,

                            apart from sharing the registry between the JBoss, you will also have to define the jms providers to point to different queues on different machines.
                            So the providers section your esb.config could look like:
                            (replace server1 and server2 by the IP addresses or dns names of your machines)

                            Can you provide full path and filename of esb.config ? I can't find it :(

                            • 11. Re: 2 queues on 2 servers
                              bernard.tison

                              rukus,

                              my bad! I actually meant jboss-esb.xml

                              Bernard

                              • 12. Re: 2 queues on 2 servers
                                rukus

                                 

                                "burrsutter" wrote:
                                OK.
                                Server 1 has ESB Server running which contains a the JBoss Messaging broker.

                                Server 2 has another ESB Server.

                                You need the 2nd instance of the ESB Server on Server 2 to share the same registry as Server 1.

                                Kurt is our expert on jUDDI setup but here are my initial thoughts:
                                Look at esb.juddi.properties in
                                jbossesb-server-4.2MR2\server\default\deploy\jbossesb.sar
                                Note: change "localhost:8080" to the other server's host name.

                                That is all the info that I have as I've not tested this particular configuration before.

                                Burr

                                I don't understand: why I need to share registry?

                                • 13. Re: 2 queues on 2 servers
                                  rukus

                                   

                                  "bernard.tison" wrote:
                                  rukus,

                                  my bad! I actually meant jboss-esb.xml

                                  Bernard

                                  Is this file used in client application?

                                  • 14. Re: 2 queues on 2 servers
                                    bernard.tison

                                    Rukus,

                                    jboss-esb.xml is the configuration file - used to configure providers, services and actions in a esb deployment (.esb archive)
                                    Please have a look at the quickstarts to see how it is used.

                                    Now back to your original question: if I understand it right what you want to do is the following:
                                    - your client sends a message into a gateway endpoint (a JMS queue) on JBossESB running on machine A
                                    - the gateway wraps the incoming payload into a ESB message and puts it on a queue
                                    - a service A listening to this queue picks up this message
                                    - the service routes the message to a queue on machine B, on which JBossESB is running
                                    - on machine B, the message is picked up and processed by a service B listening to this queue.

                                    Does that describe your use case?

                                    Bernard

                                    1 2 Previous Next