[rabbitmq-discuss] RabbitMQ/Spring integration - help required

krv vivek.kubaji at onmobile.com
Sat Jun 27 21:27:12 BST 2009


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.





More information about the rabbitmq-discuss mailing list