ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prashant Punekar <Prashant_Pune...@mindtree.com>
Subject RE: How to setup multiple jms listener for a queue !
Date Wed, 09 Feb 2011 19:57:27 GMT
Hi,

I figured it out that the key to the listener is the combination of jndi-server-name, jndi-name
and topic-queue.
Hence I changed the topic-queue pointing to the same physical queue and I got two cosumers
listening to the same physical queue.

Hope this is the right approach.

Regards,
Prashant

From: Prashant Punekar
Sent: Wednesday, February 09, 2011 11:37 AM
To: user@ofbiz.apache.org
Subject: How to setup multiple jms listener for a queue !

Hi,

Here is the way we have set up a listener on Ofbiz which listens to the physical jms queue.

        <jms-service name="receiveInvServiceMessenger" send-mode="all">
            <server jndi-server-name="activeMQ"
                    jndi-name="ConnectionFactory"
                    topic-queue="queue/ReceiveInventoryQueue_in"
                    type="queue"
                    username=""
                    password=""
                    listen="true"
                    listener-class="com.pj.integration.netsuite.listeners.ReceiveInventoryQueueListener"/>
        </jms-service>

When I look into the Active MQ, I can see 1 consumer listening to the queue mentioned. How
can increase the number to 2 ? How can I have multiple consumers listening to the same queue
?

I tried following two different options which did not work :
1 )

        <jms-service name="receiveInvServiceMessenger" send-mode="all">
            <server jndi-server-name="activeMQ"
                    jndi-name="ConnectionFactory"
                    topic-queue="queue/ReceiveInventoryQueue_in"
                    type="queue"
                    username=""
                    password=""
                    listen="true"
                    listener-class="com.pj.integration.netsuite.listeners.ReceiveInventoryQueueListener"/>
        </jms-service>
        <jms-service name="receiveInvServiceMessenger2" send-mode="all">
            <server jndi-server-name="activeMQ"
                    jndi-name="ConnectionFactory"
                    topic-queue="queue/ReceiveInventoryQueue_in"
                    type="queue"
                    username=""
                    password=""
                    listen="true"
                    listener-class="com.pj.integration.netsuite.listeners.ReceiveInventoryQueueListener"/>
        </jms-service>

2)
        <jms-service name="receiveInvServiceMessenger" send-mode="all">
            <server jndi-server-name="activeMQ"
                    jndi-name="ConnectionFactory"
                    topic-queue="queue/ReceiveInventoryQueue_in"
                    type="queue"
                    username=""
                    password=""
                    listen="true"
                    listener-class="com.pj.integration.netsuite.listeners.ReceiveInventoryQueueListener"/>
        </jms-service>
        <jms-service name="receiveInvServiceMessenger2" send-mode="all">
            <server jndi-server-name="activeMQ"
                    jndi-name="ConnectionFactory"
                    topic-queue="queue/ReceiveInventoryQueue_in"
                    type="queue"
                    username=""
                    password=""
                    listen="true"
                    listener-class="com.pj.integration.netsuite.listeners.ReceiveInventoryQueueListenerNew"/>
        </jms-service>

Regards,
Prashant


________________________________

http://www.mindtree.com/email/disclaimer.html

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message