9 Replies Latest reply on Aug 30, 2013 5:27 PM by jbertram

    Publish JMS Message from on JBOSS AS to JMS Server in another JBOSS AS

    billhmoore

      I have tried to follow information from this site:  http://lukaszantoniak.wordpress.com/2012/12/11/jboss-as-7-remote-jms-queue/

       

      <connector name="remote-jms-nonmgmt">

          <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

           <param key="host" value="168.179.60.173"/>

           <param key="port" value="5445"/>

      </connector>

      <netty-connector name="remote-jms-mgmt" socket-binding="remote-jms-binding"/>

       

      The ip address is the address of the JBOSS AS7 with hornetq and topics

       

      I also added the following to the jms-connection-factories:

       

                     <connection-factory name="ConnectionFactory1NonMgmt">

                             <connectors>

                                <connector-ref connector-name="remote-jms-nonmgmt"/>

                             </connectors>

                             <entries>

                                <entry name="java:/ConnectionFactory1NonMgmt"/>

                             </entries>

                          </connection-factory>

                          <pooled-connection-factory name="ConnectionFactory1Mgmt">

                             <user>billhmoore</user>

                             <password>pebhup2012</password>

                             <connectors>

                                <connector-ref connector-name="remote-jms-mgmt"/>

                             </connectors>

                             <entries>

                                <entry name="java:/ConnectionFactory1Mgmt"/>

                             </entries>

                          </pooled-connection-factory>

       

      I have also added the following to socket-binding-group:

       

          <outbound-socket-binding name="remote-jms-binding">
              <remote-destination host="168.179.60.173" port="5445"/>
          </outbound-socket-binding>

      When I run the webapp in a JBOSS AS7, I get the following:

       

      13:16:39,904 DEBUG [org.jboss.naming.remote.server.RemoteNamingService] (Remoting "sedws-d1lf-0v13" task-1) Channel Opened - Channel ID 13eda06c (inbound) of Remoting connection 4c45a3ad to /168.179.145.226:50216

      13:16:39,935 DEBUG [org.jboss.naming.remote.server.RemoteNamingService] (Remoting "sedws-d1lf-0v13" task-3) Chosen version 0x01

      13:16:39,959 DEBUG [org.jboss.as.ejb3.remote.EJBRemoteConnectorService] (Remoting "sedws-d1lf-0v13" task-2) Client with protocol version 1 and marshalling strategy river trying to communicate on Channel ID 05908c4e (inbound) of Remoting connection 4c45a3ad to /168.179.145.226:50216

      13:16:39,965 DEBUG [org.jboss.as.ejb3.remote.protocol.versionone.VersionOneProtocolChannelReceiver] (Remoting "sedws-d1lf-0v13" task-2) Sending initial module availability message, containing 2 module(s) to channel Channel ID 05908c4e (inbound) of Remoting connection 4c45a3ad to /168.179.145.226:50216

       

      host sure were the ip: 168.179.145.226 is coming from.

       

      I attempt to get the topic using "java:/topic/whm_dev_ATRInboundTopic" and get the following error:

       

      13:16:39,970 ERROR [stderr] (MSC service thread 1-13) javax.naming.NameNotFoundException: topic/whm_dev_ATRInboundTopic -- service jboss.naming.context.java.topic.whm_dev_ATRInboundTopic

        • 1. Re: Publish JMS Message from on JBOSS AS to JMS Server in another JBOSS AS
          jbertram

          If all you want to do is publish messages from one server to another then you can get rid of the following:

          • "remote-jms-nonmgmt" connector
          • "ConnectionFactory1NonMgmt" connection-factory

           

          Just use the "ConnectionFactory1Mgmt" pooled-connection-factory.

           

          Also, you say you're doing a JNDI lookup for the destination, but there is no such lookup in the instructions you cited.  The instructions are using the JMS API to create a reference to the destination for the producer to use.  You should be able to do the same.

          • 2. Re: Publish JMS Message from on JBOSS AS to JMS Server in another JBOSS AS
            billhmoore

            14:27:05,990 ERROR [stderr] (MSC service thread 1-2) javax.jms.JMSException: There is no topic with name topic/whm_dev_ATRInboundTopic

            • 3. Re: Publish JMS Message from on JBOSS AS to JMS Server in another JBOSS AS
              jbertram

              Code?

              • 4. Re: Publish JMS Message from on JBOSS AS to JMS Server in another JBOSS AS
                jbertram

                Also, the XML for the topic definition would be helpful too.

                • 5. Re: Publish JMS Message from on JBOSS AS to JMS Server in another JBOSS AS
                  billhmoore

                  The publishing JBOSS AS seems to be working as I get no errors, but I don't see any messages on the JBOSS AS with the JMS Server.

                   

                  I don't see any error on either side but there is no messages.

                   

                  Not sure how to proceed from here?

                   

                  I am attaching my standalone-full.xml which has the remote connection setup and the other file is contains the logging from the publishing webapp and the code which I am using.

                   

                  I turned on debug in the JBOSS AS with the JMS Server and here is what I am seeing:

                   

                  18:14:01,754 DEBUG [org.hornetq.core.postoffice.impl.PostOfficeImpl] (Old I/O se

                  rver worker (parentId: 10959037, [id: 0x00a738bd, AF_EREP_080.utah.utad.state.ut

                  .us/168.179.60.173:5445])) Message ServerMessage[messageID=34360433167,priority=

                  4, bodySize=237,expiration=0, durable=true, address=jms.topic.whm_dev_ATRInbound

                  Topic,properties=TypedProperties[null]]@18561536 is not going anywhere as it did

                  n't have a binding on address:jms.topic.whm_dev_ATRInboundTopic

                   

                  I have already added the following to the standalone-full.xml on the JBOSS Server with JMS Server:

                              <security-settings>
                                  <security-setting match="#">
                                      <permission type="send" roles="guest"/>
                                      <permission type="consume" roles="guest"/>
                                      <permission type="createNonDurableQueue" roles="guest"/>
                                      <permission type="deleteNonDurableQueue" roles="guest"/>
                                      <permission type="createDurableQueue" roles="guest"/>
                                      <permission type="deleteDurableQueue" roles="guest"/>
                                  </security-setting>
                              </security-settings>
                  • 6. Re: Publish JMS Message from on JBOSS AS to JMS Server in another JBOSS AS
                    billhmoore

                    I have been googling but I cannot find a solution to my issue.

                    Can anyone provide assistance?

                    • 7. Re: Publish JMS Message from on JBOSS AS to JMS Server in another JBOSS AS
                      jbertram

                      Based on the logging and your description of the problem I'd say you don't have any subscribers on the topic which means the message will be deleted.  This is the basic semantics of a topic.

                      1 of 1 people found this helpful
                      • 8. Re: Publish JMS Message from on JBOSS AS to JMS Server in another JBOSS AS
                        billhmoore

                        Justin,

                         

                        Thanks again!!

                         

                        Your explanation makes sense.

                         

                        It is too bad that the logged message was not clear enough - like topic has no subscriptions.

                         

                        Also I am having nothing but trouble replying due to errors on community site.  I have tried three different desktops and all encounter the same error.

                        • 9. Re: Publish JMS Message from on JBOSS AS to JMS Server in another JBOSS AS
                          jbertram

                          It is too bad that the logged message was not clear enough - like topic has no subscriptions.

                          Keep in mind that HornetQ is a generic message broker.  It does much more than JMS, and hardly ever will it log anything a debug level in strictly JMS terms.  In the nomenclature of HornetQ the log message makes perfect sense.  Furthermore, a message being deleted from a JMS topic when there are no subscribers is not atypical.  As I indicated previously, this is the normal semantics of a JMS topic.

                           

                          Also I am having nothing but trouble replying due to errors on community site.  I have tried three different desktops and all encounter the same error.

                          I apologize for any inconvenience.  From what I understand the whole site was upgraded recently.  I suppose the problems are related to that.