How to configure a CXF endpoint (using SOAP over JMS) to be an exclusive JMS consumer for ActiveMQ?

Solution Verified - Updated -

Issue

A Camel route consuming from a CXF endpoint (which uses SOAP over JMS) is connecting to an ActiveMQ broker where it is mandatory that the JMS consumer needs to be exclusive (i.e. only one active consumer allowed at any time).

The relevant JMS configuration is:

    <bean id="postMessageProxyJmsConfig" class="org.apache.cxf.transport.jms.JMSConfiguration">
           <property name="connectionFactory" ref="esbHaPooledConnectionFactory"/>
           <property name="concurrentConsumers" value="1"/>
           <property name="targetDestination" value="my.test.queue?destination.consumer.exclusive=true"/>
           <property name="pubSubDomain" value="false"/>
           <property name="receiveTimeout" value="30000"/>
    </bean>

The required functionality of an exclusive JMS consumer should be achieved by setting destination.consumer.exclusive=true.

The configured bean is referenced by an CXF endpoint as below

    <cxf:cxfEndpoint id="postMessageProxyJMSEndpoint"
        <cxf:features>
            <bean class="org.apache.cxf.transport.jms.JMSConfigFeature"
                  p:jmsConfig-ref="postMessageProxyJmsConfig"/>
        </cxf:features>
    </cxf:cxfEndpoint>

But the consumer created is not exclusive. Other consumers can connect to the same queue. What is the issue?

Environment

  • JBoss Fuse 6.3
  • Camel with CXF (SOAP over JMS)
  • Exclusive JMS consumer

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content