[rabbitmq-discuss] Polling message from RabbitMQ by servicemix.

Holger Hoffstätte holger at wizards.de
Sun Dec 14 09:37:28 GMT 2008


aznmedia wrote:
> 
> I'm writing my xbean.xml file like following:
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:jee="http://www.springframework.org/schema/jee"
>       xmlns="http://www.springframework.org/schema/beans"
>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>       xsi:schemaLocation="http://servicemix.apache.org/jms/1.0
> http://servicemix.apache.org/schema/servicemix-jms-3.2.2.xsd
>       http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> 
>        <jms:consumer service="my:ConsumerService"
>                endpoint="mq"
>                destinationName="rabbit-queue"
>                connectionFactory="#connectionFactory"
>                concurrentConsumers="8" />
> 
> 
>        <bean id="connectionFactory"
> class="com.rabbitmq.client.ConnectionFactory">
[..]

I think there is some general confusion going on here. The ServiceMix
consumer bean expects a *JMS* ConnectionFactory, but that will not work
with the RabbitMQ connection factory, since it plays the same role
(connection management) but does *not* implement the necessary JMS
functionality. You will either have to wait until AMQP (or in this case
the RabbitMQ library) implements JMS, or write your own AMQP/Rabbit
transport for ServiceMix. Alternatively you might try a Qpid client
library which is reported to work against a Rabbit broker (though I cannot
say how well).

-h




More information about the rabbitmq-discuss mailing list