Consumer exchange and queue declaration

457 views
Skip to first unread message

Doğukan Güran

unread,
Aug 5, 2014, 9:01:38 AM8/5/14
to rabbitm...@googlegroups.com
Hi,

I wonder that Do i have to do same declarations both in the publisher and consumer side. I ask the question because in the basicConsume, there is a parameter queueName,
I.e. I have 4 queues and these queues are binded to the one exchange in the publisher code. For the publisher code what queue name should I use?

Any help is appreciated

Regards,
D.G.

Michael Klishin

unread,
Aug 5, 2014, 9:03:45 AM8/5/14
to rabbitm...@googlegroups.com, Doğukan Güran
On 5 August 2014 at 17:01:46, Doğukan Güran (doguka...@gmail.com) wrote:
> > I wonder that Do i have to do same declarations both in the publisher
> and consumer side. I ask the question because in the basicConsume,
> there is a parameter queueName,
> I.e. I have 4 queues and these queues are binded to the one exchange
> in the publisher code. For the publisher code what queue name
> should I use?

Publishers typically should only know where to publish. Consumers should declare
queues and bindings because you have more relevant info (e.g. queue names) in the consumers
apps.

But this is a guideline, not a rule. 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Doğukan Güran

unread,
Aug 5, 2014, 9:17:04 AM8/5/14
to rabbitm...@googlegroups.com, doguka...@gmail.com
Thanks,

Let me say what I understand. The consumer basically declare exchange and queues, and publisher just declare the same exchange and makes it publishes.
Am I right?

Please consider my 4 queues and 1 exchange.
Regards
D.G.

Michael Klishin

unread,
Aug 5, 2014, 9:18:29 AM8/5/14
to rabbitm...@googlegroups.com, Doğukan Güran
On 5 August 2014 at 17:17:10, Doğukan Güran (doguka...@gmail.com) wrote:
> > Let me say what I understand. The consumer basically declare
> exchange and queues, and publisher just declare the same exchange
> and makes it publishes.
> Am I right?

Correct.
Reply all
Reply to author
Forward
0 new messages