1 2 Previous Next 23 Replies Latest reply on May 20, 2015 10:14 AM by rjakkula Go to original post
      • 15. Re: Jboss SOA P hornetq core bridge
        jbertram

        I don't have time to spend setting this all up.  As noted previously, a reproducible test-case is something I can run to reproduce the problem (i.e. not something I have to spend time setting up).  I recommend you simply take one of the examples shipped with HornetQ, modify it to reproduce the problem you're seeing, and then attach that to your comment.  The examples are simple and self-contained.  I can then take that and extract it to the examples directory and reproduce the problem by running one command.

         

        One more thing...Don't create new documents and attach the files there.  Just attach them directly to your comment using the "advanced editor."  You can use the "advanced editor" by clicking the link "Use advanced editor" near the top right of the comment box.

        • 16. Re: Jboss SOA P hornetq core bridge
          rjakkula

          Justin,

           

           

          No need to setup anything, just have to deploy the attached hornetq-configuration.xml and hornetq-jms.xml and insert message in QueueA.

          • 17. Re: Jboss SOA P hornetq core bridge
            jbertram

            I had a bit of time to set this up so I gave it a shot.  Here are my observations:

            1. The configuration you attached wouldn't even start.  I had to first correct the *-directory elements in hornetq-configuration.xml and then remove the duplicate JNDI entries in hornetq-jms.xml.
            2. Your problem is related to your queue/address configuration.  Basically you have multiple queues associated with each address so you get what looks to be duplicate messages when, in fact, that is exactly how the broker should behave under this configuration.  To be specific, you were sending messages to the address "jms.queue.QueueA" and this address had 2 queues associated with it - "QueueA" and "jms.queue.QueueA".  The bridge was configured to move messages from "QueueA" to the address "jms.queue.QueueB".  However, the address "jms.queue.QueueB" also has 2 queues associated with it - "QueueB" and "jms.queue.QueueB".  Here is what you should be using for your use-case:

             

              <bridges>
                <bridge name="Queue-A-B-bridge">
                      <queue-name>jms.queue.QueueA</queue-name>
                      <forwarding-address>jms.queue.QueueB</forwarding-address>
                      <retry-interval>1000</retry-interval>
                      <retry-interval-multiplier>1.0</retry-interval-multiplier>
                      <reconnect-attempts>-1</reconnect-attempts>
                      <failover-on-server-shutdown>false</failover-on-server-shutdown>
                      <use-duplicate-detection>false</use-duplicate-detection>
                      <confirmation-window-size>10000000</confirmation-window-size>
                      <static-connectors>
                        <connector-ref>in-vm</connector-ref>
                      </static-connectors>         
                </bridge>
              </bridges>
            
              <queues>
                <queue name="jms.queue.QueueA">
                  <address>jms.queue.QueueA</address>
                </queue>
                <queue name="jms.queue.QueueB">
                  <address>jms.queue.QueueB</address>
                </queue>
              </queues>
            

             

            Again, I encourage you to read the JMS-to-core mapping documentation that I linked previously.  It should help you avoid errors like this in the future.

            1 of 1 people found this helpful
            • 18. Re: Jboss SOA P hornetq core bridge
              rjakkula

              Thanks a lot Justin, I could make it work in my local now. I see the issue, initially I didn't have them in hornetq-jms.xml but a lot of examples online seems to have both in hornetq-configuration.xml aand hornetq-jms.xml.

               

              We can close this issue as successfully resolved. Thanks again !

              • 19. Re: Jboss SOA P hornetq core bridge
                jbertram

                The only technical reason you need to define destinations in hornetq-jms.xml is if your JMS clients needed to look up the destinations via JNDI.

                1 of 1 people found this helpful
                • 20. Re: Jboss SOA P hornetq core bridge
                  rjakkula

                  Justin,

                   

                  I added QueueA to hornetq-jms.xml since I want to insert message into QueueA over JNDI. But then hornetq-configuration.xml was complaining while loading since I removed QueueA from it.

                   

                  So I added the QueueA both in hornetq-configuration.xml and hornetq-jms.xml as below. But then I end up with the same issue as before. How do I makes sure that there is only instance of QueueA.

                   

                  hornetq-configuraion.xml

                   

                  <queues>

                     <queue name="jms.queue.QueueA">

                         <address>jms.queue.QueueA</address>

                      </queue>

                      <queue name="QueueB">

                         <address>jms.queue.QueueB</address>

                      </queue>

                    </queues>

                   

                   

                  hornetq-jms.xml

                   

                  <queue name="jms.queue.QueueA">

                    <entry name="jms.queue.QueueA" />

                      </queue>

                  • 21. Re: Jboss SOA P hornetq core bridge
                    rjakkula

                    Arrived at right configuration after some trials. Thanks Justin for helping me troubleshoot this issue.

                     

                    Below is my hornetq-configuraion.xml

                     

                    • <bridges> 
                    •     <bridge name="Queue-A-B-bridge"> 
                    •           <queue-name>jms.queue.QueueA</queue-name> 
                    •           <forwarding-address>jms.queue.QueueB</forwarding-address> 
                    •           <retry-interval>1000</retry-interval> 
                    •           <retry-interval-multiplier>1.0</retry-interval-multiplier> 
                    •           <reconnect-attempts>-1</reconnect-attempts> 
                    •           <failover-on-server-shutdown>false</failover-on-server-shutdown> 
                    •           <use-duplicate-detection>false</use-duplicate-detection> 
                    •           <confirmation-window-size>10000000</confirmation-window-size> 
                    •           <static-connectors> 
                    •             <connector-ref>in-vm</connector-ref> 
                    •           </static-connectors>          
                    •     </bridge> 
                    •   </bridges> 
                    •  
                    •   <queues> 
                    •     <queue name="jms.queue.QueueA"> 
                    •       <address>jms.queue.QueueA</address> 
                    •     </queue> 
                    •     <queue name="jms.queue.QueueB"> 
                    •       <address>jms.queue.QueueB</address> 
                    •     </queue> 
                    •   </queues> 

                     

                    And in my hornetq-jms.xml I have this

                     

                      <queue name="QueueA"> 

                     

                     

                          <entry name="/queue/QueueA" />

                     

                     

                        </queue>

                    • 22. Re: Jboss SOA P hornetq core bridge
                      jbertram

                      No "trials" should be necessary.  You simply should read the documentation I linked previously.  It explains the JMS-to-core mapping.  I think all your issues could have been avoided from this simple step.

                      • 23. Re: Jboss SOA P hornetq core bridge
                        rjakkula

                        Agreed I need to do some reading

                        1 2 Previous Next