[rabbitmq-discuss] newbie question about exchange declaration

ChadDavis chadmichaeldavis at gmail.com
Mon May 13 21:43:54 BST 2013

I'm going through the Java PubSub tutorial [1].  I don't quite
understand why the consumer side code ( ReceiveLogs.java ) has the
exchangeDeclaration method call.  Seems like that's the produced side

        channel.exchangeDeclare(EXCHANGE_NAME, "fanout");

Is this just so that whoever get's there first, producer or consumer,
can create the exchange so they can move on to their other chores,
such as queuebinding in the case of the consumer?

1  http://www.rabbitmq.com/tutorials/tutorial-three-java.html

More information about the rabbitmq-discuss mailing list