[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-dev
Subject:    Re: Parallel calls from 1 consumer to provider
From:       Jim Gomes <jgomes () apache ! org>
Date:       2016-12-17 23:36:48
Message-ID: CAGeZ+bh7WzARrQBOqaZEzYeiFJ53Hr53BfB-aajTXzadhkotzw () mail ! gmail ! com
[Download RAW message or body]


Hi Jakki,

I think you may be misunderstanding the nature of queues.  Perhaps a topic
might be what you are looking for?  A queue will deliver the message to
only one consumer, even if there are multiple consumers connected.  It will
use a round-robin delivery mechanism.  For two consumers, each consumer
will get every-other message.  If you want your multiple consumers to get
all of the messages, then a topic is what you want. All consumers will get
all messages.

Best,
Jim


On Fri, Dec 16, 2016 at 11:24 AM Jakki <jakkisri84@gmail.com> wrote:

> I am developing a C#.Net windows service that uses Apache.NMS.ActiveMQ. In
> this design i have multiple consumers and 1 provider. each consumer has to
> access multiple messages from queue and process it parallely.
> ex: I have 100 messages in a queue. 2 consumers are polling the same queue.
> 1st consumer has to get 10messages  and another 10 messages for 2nd
> consumer
> and in each consumer i create multiple threads to handle the messages like
> call webservice for each message. but i am stuck with only 1 message for a
> consumer it is accessed sequentially but not parallely.
> Could you please provide a sample of code?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Parallel-calls-from-1-consumer-to-provider-tp4720535.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic