You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Luiz Eduardo Guida Valmont <va...@alis-sol.com.br> on 2019/01/16 15:08:33 UTC

Duplicate Messages (Multiple Consumers?)

Hi!

Question: is it possible to configure a route so that at any given time 
there is at most one consumer?


I thought of using idempotentConsumers. The expression for the message 
id would be any constant, really. This way, when another consumer tries 
to process the exchange, it'd be discarded.


http://people.apache.org/~dkulp/camel/idempotent-consumer.html


But this seems like bending the rules more than what I'd like to. Hence 
the question. If there's a way to do a semaphore like step, that'd be 
lovely.


Thanks in advance!

Luiz



Re: Duplicate Messages (Multiple Consumers?)

Posted by Luiz Eduardo Guida Valmont <va...@alis-sol.com.br>.
Hi, Andrea!


Thanks for the quick reply!


I was looking at the disruptor, but the master component seems much more 
suited to the task at hand. For starters, it needs next to no 
configuration at all. It looks like a case of just prefixing the routes 
with "master:[namespace]". Awesome.


If the current architecture of multiple routes present a problem, then 
it'll be just a case of simplifying the routes and refactoring certain 
activities into beans. But I believe that won't be necessary.


Have a good one! =)

On 16/01/2019 13:12, Andrea Cosentino wrote:
> You can take a look at the master component
>
> https://github.com/apache/camel/blob/master/components/camel-master/src/main/docs/master-component.adoc
>
>
>
> --
> Andrea Cosentino
> ----------------------------------
> Apache Camel PMC Chair
> Apache Karaf Committer
> Apache Servicemix PMC Member
> Email: ancosen1985@yahoo.com
> Twitter: @oscerd2
> Github: oscerd
>
>
>
>
>
>
> On Wednesday, January 16, 2019, 4:08:41 PM GMT+1, Luiz Eduardo Guida Valmont <va...@alis-sol.com.br> wrote:
>
>
>
>
>
> Hi!
>
> Question: is it possible to configure a route so that at any given time
> there is at most one consumer?
>
>
> I thought of using idempotentConsumers. The expression for the message
> id would be any constant, really. This way, when another consumer tries
> to process the exchange, it'd be discarded.
>
>
> http://people.apache.org/~dkulp/camel/idempotent-consumer.html
>
>
> But this seems like bending the rules more than what I'd like to. Hence
> the question. If there's a way to do a semaphore like step, that'd be
> lovely.
>
>
> Thanks in advance!
>
> Luiz
>

Re: Duplicate Messages (Multiple Consumers?)

Posted by Andrea Cosentino <an...@yahoo.com.INVALID>.
You can take a look at the master component

https://github.com/apache/camel/blob/master/components/camel-master/src/main/docs/master-component.adoc



--
Andrea Cosentino 
----------------------------------
Apache Camel PMC Chair
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1985@yahoo.com
Twitter: @oscerd2
Github: oscerd






On Wednesday, January 16, 2019, 4:08:41 PM GMT+1, Luiz Eduardo Guida Valmont <va...@alis-sol.com.br> wrote: 





Hi!

Question: is it possible to configure a route so that at any given time 
there is at most one consumer?


I thought of using idempotentConsumers. The expression for the message 
id would be any constant, really. This way, when another consumer tries 
to process the exchange, it'd be discarded.


http://people.apache.org/~dkulp/camel/idempotent-consumer.html


But this seems like bending the rules more than what I'd like to. Hence 
the question. If there's a way to do a semaphore like step, that'd be 
lovely.


Thanks in advance!

Luiz