-
Oct 5th, 2008, 01:13 PM
#1
How to connect to Active MQ broker running in another Machine
Hi,
I am trying to connect to active MQ broker which is running in a remote machine. [the configuration part is below].But i am getting the following error.How can i connect to Active MQ broker running in different machine using spring configurtion.
java.io.IOException: Failed to bind to server socket: stomp://wendy-test.nyc.e-infoexchange.net:61613 due to: java.net.BindException: Cannot assign requested address: JVM_Bind
at org.apache.activemq.util.IOExceptionSupport.create (IOExceptionSupport.java:31)
at org.apache.activemq.transport.tcp.TcpTransportServ er.bind(TcpTransportServer.java:88)
at org.apache.activemq.transport.tcp.TcpTransportFact ory.doBind(TcpTransportFactory.java:56)
<amq:broker useJmx="false" persistent="false">
<amq:transportConnectors>
<amq:transportConnector uri="stomp://remoteIP:61613" />
</amq:transportConnectors>
</amq:broker>
<bean id="jmsFactory" class="org.apache.activemq.pool.PooledConnectionFa ctory">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFacto ry" >
<property name="brokerURL">
<value>vm://remoeIP:61613</value>
</property>
</bean>
</property>
</bean>
-
Oct 5th, 2008, 05:36 PM
#2
Your config does NOT indicate that you are trying to connect to a remote JMS server; it indicates that you are trying to HOST a JMS broker, which is why you are getting a 'server bind exception'. You cannot bind a REMOTE address for a server socket.
-
Oct 5th, 2008, 06:23 PM
#3
Thanks for ur reply. Normally i used vm://localhost in brokerURL of ActiveMQConnectionFactory bean. It was working fine. But when i try to connect to active MQ broker running in other machine, i am getting JVM binding error.Can plz explain me how can i configure spring to solve my requirement?.
-
Oct 5th, 2008, 07:12 PM
#4
It's not a spring problem, it's an active mq configuration problem.
I'd suggest that you RTFM....
You are trying to create a CLIENT connection to a remote BROKER.
http://activemq.apache.org/spring-support.html
-
Oct 5th, 2008, 08:25 PM
#5
Thanks for ur reply. The link is really useful. I modified my configuration as below. Do i need to specify anything else for stomp: transport?.
<amq:broker useJmx="false" persistent="false">
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0" />
</amq:transportConnectors>
</amq:broker>
<!-- a pooling based JMS provider -->
<bean id="jmsFactory" class="org.apache.activemq.pool.PooledConnectionFa ctory">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFacto ry" >
<property name="brokerURL">
<value>stomp://BrokermachineIP:61613</value>
</property>
</bean>
</property>
</bean>
-
Oct 5th, 2008, 08:36 PM
#6
If you are connecting to a remote mq broker, you don't need to run one on your local machine. You should NOT have an amq:broker bean defined. Just the JMS connection factory bean that connects to the remote broker.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules