Duplicate Avoidance

17 views
Skip to first unread message

Usman Asif

unread,
Mar 5, 2020, 10:34:02 AM3/5/20
to rabbitm...@googlegroups.com
Dear Gurus,

we have the application running on dot net platform(desktop application on vb .net)

we have following structure of the application
1 connection -> 1 channel -> multiple consumer on same channel -> different queues on each channel and a prefetch count is 100

now duplication occurs when we started two instances of this application to increase our performance.

but when two consumers running there is exactly 100 records duplicate whcih is equal to prefetch count

we can not afford duplicaiton because we proceed trancsactional data.

Regards 
Usman Asif

Wesley Peng

unread,
Mar 5, 2020, 2:46:08 PM3/5/20
to Usman Asif, rabbitm...@googlegroups.com
Multiple consumers share the same channel, this case may have issue due to thread safety.

Thanks 

5 березня 2020 р., 23:34:00,від "Usman Asif" <usman.a...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/CAGNBHTMYsDx5ds8zULYwQPO%3DXub20wAGLYQGxCLJ7brQO9KH3w%40mail.gmail.com.

Wesley Peng

unread,
Mar 6, 2020, 2:00:16 AM3/6/20
to Usman Asif, rabbitmq-users
It’s hard to guess what happens unless you have shown us code piece. Thanks.

6 березня 2020 р., 13:16:17,від "Usman Asif" <usman.a...@gmail.com>:

I agreed to you but as per my understanding and what I have learned in different blogs, it's totally fine to have different consumers on the same channel.
and in my case, I have different consumers on the same channel but each consumer points to a different queue.
and when I start the second instance of application duplication occurs
what's wrong in it.

it's very crucial for us as we transfer our transactional  data into rabbit MQ 


Wesley Peng

unread,
Mar 7, 2020, 6:46:36 PM3/7/20
to Usman Asif, rabbitmq-users
Do you mean Two consumers in different threads share the same channel?

I’d suggest take care on doing that. I don’t know if the language and library you are using are thread safety. 

Thanks 

7 березня 2020 р., 22:49:27,від "Usman Asif" <usman.a...@gmail.com>:

Dear Wesley,

first of all thanks for the comment, i have reviewed my code there is a small bug in my code.
please also suggest can I use the same channel with a number of consumers
also, please clear my doughts on the below point
can I use the same channel with two consumers and both consumers consume same queue. can it leads to duplicaiton
Reply all
Reply to author
Forward
0 new messages