[rabbitmq-discuss] RabbitMQ/Spring integration - help required
Alexis Richardson
alexis.richardson at gmail.com
Sun Jun 28 20:15:50 BST 2009
Vivek,
It looks like you are using a Java/JMS client from the Qpid
distribution on Apache. Not all of these clients are compatible with
RabbitMQ which implements AMQP 0-8 (though we are soon moving to AMQP
0-9-1).
Please can you check that you are using a Qpid client set up for AMQP
0-8, or, if you prefer, you can try out the OpenAMQ JMS client which
works with RabbitMQ here:
http://www.lshift.net/blog/2009/03/16/openamqs-jms-client-with-rabbitmq-server
I also recommend that you take a look at the RabbitMQ Java client
pages here: http://www.rabbitmq.com/java-client.html
Let us know how you get on - other folks have made Spring work with RabbitMQ.
Best wishes
alexis
On Sat, Jun 27, 2009 at 9:27 PM, krv<vivek.kubaji at onmobile.com> wrote:
>
> Hi,
>
> I'm trying to evaluate RabbitMQ for our project. And I'm using
> Spring-integration framework. From the posts in the forum I ended up using
> the following configuration (jms part):
>
> <beans:bean id="amqConnectionFactory"
> class="org.apache.qpid.client.AMQConnectionFactory">
> <beans:constructor-arg
> value="amqp://guest:guest@/localhost?brokerlist='tcp://localhost:5672'" />
> </beans:bean>
>
> <beans:bean id="connectionFactory"
> class="org.springframework.jms.connection.SingleConnectionFactory">
> <beans:property name="targetConnectionFactory"
> ref="amqConnectionFactory"/>
> </beans:bean>
>
> <beans:bean id="jms_QueueWest"
> class="org.apache.qpid.client.AMQQueue">
> <beans:constructor-arg>
> <beans:bean
> class="org.apache.qpid.url.AMQBindingURL">
> <beans:constructor-arg
> value="${jms.queue1}"/>
> </beans:bean>
> </beans:constructor-arg>
> </beans:bean>
>
> and have this in my properties file:
>
> jms.queue1=direct://rabbit//my.queue1
>
> I'm running the RabbitMQ broker using the command
> $RABBITMQ_HOME$/sbin/rabbitmq-server.bat. When I start my client application
> I am getting the following error:
>
> 2009-06-25 19:00:21,192 INFO
> org.springframework.jms.listener.DefaultMessageListenerContainer#0-1
> [DefaultMessageListenerContainer.refreshConnectionUntilSuccessful] - Could
> not refresh JMS Connection for destination
> 'direct://rabbit/my.queue1/my.queue1?routingkey='my.queue1'' - retrying in
> 5000 ms. Cause: Error creating connection: Unable to Connect
> org.apache.qpid.transport.ConnectionException
> at org.apache.qpid.transport.Connection.close(Connection.java:494)
> at org.apache.qpid.transport.Connection.connect(Connection.java:193)
> at
> org.apache.qpid.client.AMQConnectionDelegate_0_10.makeBrokerConnection(AMQConnectionDelegate_0_10.java:161)
> at
> org.apache.qpid.client.AMQConnection.makeBrokerConnection(AMQConnection.java:728)
> at
> org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:520)
> at
> org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:276)
> at
> org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:343)
> at
> org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:290)
> at
> org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:227)
> at
> org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
> at
> org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:378)
> at
> org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:363)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:785)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:767)
> at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:898)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.qpid.transport.ConnectionException
> at
> org.apache.qpid.transport.Connection.exception(Connection.java:405)
> at
> org.apache.qpid.transport.network.Assembler.exception(Assembler.java:108)
> at
> org.apache.qpid.transport.network.InputHandler.exception(InputHandler.java:196)
> at
> org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:146)
> ... 1 more
> Caused by: java.lang.IllegalStateException
> at
> org.apache.qpid.transport.network.InputHandler.next(InputHandler.java:190)
> at
> org.apache.qpid.transport.network.InputHandler.received(InputHandler.java:103)
> at
> org.apache.qpid.transport.network.InputHandler.received(InputHandler.java:42)
> at
> org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:128)
> ... 1 more
>
> Seeing the error I feel I have some stupid mistake . Somebody please help me
> ...
>
> Thanks in advance.
>
> Regards,
> Vivek
> --
> View this message in context: http://www.nabble.com/RabbitMQ-Spring-integration---help-required-tp24236352p24236352.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
More information about the rabbitmq-discuss
mailing list