0

What I'm trying to do is send a message to a Queue on Wildly 8.2 which is situated on a different server than the one i am send the message from.

[QueueSend] --> [Wildfly 8.2]

Widlfy is setup using the http-connector.

The code i am using is a slight modification of this: HelloWordJMSClient

I've used the arguement http-remoting://<IP>:8080 but with no luck.

Obviously i have not provided much detail here so an answer i am looking for is the basic configuration required (either in the code, standalone file, etc) to allow me to send a message from one box, to the Wildfly box.

Thanks for your help.

EDIT: The error i am getting when trying to send the message is:

Attempting to acquire connection factory "jms/RemoteConnectionFactory"
NamingException encountered Failed to connect to any server. Servers tried: [http-remoting://192.168.12.3:8080 (java.net.ConnectException: Connection refused: no further information)]
Waddas
  • 1,353
  • 2
  • 16
  • 28
  • How are you trying to establish the connection? in `standalone.xml`? It seems like the answer to http://stackoverflow.com/questions/28350181/wildfly-8-2-configure-jms-bridge-for-remote-servers may help you. – John Ament Apr 28 '15 at 12:55
  • @JohnAment The Wildfly confiduration is setup using standalone-full.xml. QueueSend is on a different box and i'd like to send a message across to a different box where Wildfly is. – Waddas Apr 28 '15 at 12:58

1 Answers1

0

Lets assume your app is running on server A and you want to send a message to server B.

On server A you must configure the messaging subsystem with a connector and a connection facotry like this:

<connectors>
    <!-- Remote Connector "pointing" to node2's broker -->
    <netty-connector name="netty-B" socket-binding="B-jms-broker">
    </netty-connector>

    <in-vm-connector name="in-vm" server-id="0" />
</connectors>
<jms-connection-factories>
    <connection-factory name="BConnectionFactory">
        <connectors>
            <connector-ref connector-name="netty-B" />
        </connectors>
        <entries>
            <entry name="java:/BConnectionFactory" />
        </entries>
    </connection-factory>
</jms-connection-factories>

And in the socket binding section you must add an outbout socket binding:

<socket-binding-group name="standard-sockets"
    default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

    <outbound-socket-binding name="B-jms-broker">
        <remote-destination host="${serverB.host:127.0.0.1}"
            port="${serverB.broker.port:5445}" />
    </outbound-socket-binding>

</socket-binding-group>

Then, on server B you must configure an acceptor in the messaging subsystem like this:

<acceptors>
    <netty-acceptor name="netty-B" socket-binding="B-jms-broker"/>
</acceptors>

And in the socket binding section you must add an outbout socket binding:

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="B-jms-broker" port="${serverB.broker.port:5445}"/>
</socket-binding-group>
Martins
  • 1,231
  • 2
  • 14
  • 17