Micheal, I looked at the links you sent me and based my new approach on them. And, I did the following (and no errors but it&#39;s not doing what i wanted):<br><br>I declared two queues q1 and q2 and bind them to a fanout exchange. Then I published the message to the exchange.<br>
<br>On the receiving end of my application, I declared another queue (q3) and bind it to the same exchange. Then when I consume messages I consume from q3 via the exchange I declared. But I don&#39;t expect to get any messages since I send the messages to queues q1 and q2 but requesting a message from q3. The problem is, I still get messages. I could be asking a lot but please bear with me. Please look at the code I have and point me to the right direction:<br>
<br>//EmitLog.cs<br>using System;<br>using RabbitMQ.Client;<br><br>class EmitLog {<br>��� public static void Main(string[] args) {<br>������� ConnectionFactory factory = new ConnectionFactory();<br>������� factory.HostName = &quot;localhost&quot;;<br>
������� using (IConnection connection = factory.CreateConnection())<br>������� using (IModel channel = connection.CreateModel()) {<br>����������� channel.ExchangeDeclare(&quot;logs&quot;, &quot;fanout&quot;);<br>��� ��� ��� channel.QueueDeclare(&quot;q1&quot;, false, false, false, null);<br>
��� ��� ��� channel.QueueDeclare(&quot;q2&quot;, false, false, false, null);<br>��� ��� ��� channel.QueueBind(&quot;q1&quot;, &quot;logs&quot;, &quot;&quot;);<br>����������� channel.QueueBind(&quot;q2&quot;, &quot;logs&quot;, &quot;&quot;);<br>
��� ��� ��� <br>����������� string message = (args.Length &gt; 0) ? string.Join(&quot; &quot;, args)<br>���������������������������������������������� : &quot;info: Hello World!&quot;;<br>����������� byte[] body = System.Text.Encoding.UTF8.GetBytes(message);<br>
����������� channel.BasicPublish(&quot;logs&quot;, &quot;&quot;, null, body);<br>��� ��� ��� Console.WriteLine(&quot; [x] Sent {0}&quot;, message);<br>������� }<br>��� }<br>}<br><br><br><br>//ReceiveLogs.cs<br>using System;<br>
using RabbitMQ.Client;<br>using RabbitMQ.Client.Events;<br><br>class ReceiveLogs {<br>��� public static void Main(string[] args) {<br>������� ConnectionFactory factory = new ConnectionFactory();<br>������� factory.HostName = &quot;localhost&quot;;<br>
������� using (IConnection connection = factory.CreateConnection())<br>������� using (IModel channel = connection.CreateModel()) {<br>����������� channel.ExchangeDeclare(&quot;logs&quot;, &quot;fanout&quot;);<br><br>����������� //string queue_name = channel.QueueDeclare();<br>
��� ��� ��� //string queue_name2 = channel.QueueDeclare();<br>��� ��� ��� //channel.QueueDeclare(&quot;q1&quot;, false, false, false, null);<br>��� ��� ��� channel.QueueDeclare(&quot;q3&quot;, false, false, false, null);<br>
��� <br>��� ��� ��� //channel.QueueBind(&quot;q2&quot;, &quot;logs&quot;, &quot;&quot;);<br>����������� channel.QueueBind(&quot;q3&quot;, &quot;logs&quot;, &quot;&quot;);<br>����������� QueueingBasicConsumer consumer = new QueueingBasicConsumer(channel);<br>
����������� //channel.BasicConsume(&quot;q2&quot;, true, consumer);<br>��� ��� ��� channel.BasicConsume(&quot;q3&quot;, true, consumer);<br>��� ��� ��� <br>����������� Console.WriteLine(&quot; [*] Waiting for logs.&quot; +<br>
����������������������������� &quot;To exit press CTRL+C&quot;);<br>����������� while(true) {<br>��������������� BasicDeliverEventArgs ea =<br>������������������� (BasicDeliverEventArgs)consumer.Queue.Dequeue();<br><br>��������������� byte[] body = ea.Body;<br>
��������������� string message = System.Text.Encoding.UTF8.GetString(body);<br>��������������� Console.WriteLine(&quot; [x] {0}&quot;, message);<br>����������� }<br>������� }<br>��� }<br>}<br><br>Thanks,<br><br><div class="gmail_quote">
On Sat, Jul 9, 2011 at 1:00 PM, Michael Klishin <span dir="ltr">&lt;<a href="mailto:michael.s.klishin@gmail.com">michael.s.klishin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">2011/7/9 Demiss Zike <span dir="ltr">&lt;<a href="mailto:habtdemis@gmail.com" target="_blank">habtdemis@gmail.com</a>&gt;</span><br></div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


However, I am getting CS1501: No overload for method &#39;QueueDeclare&#39; takes 2 arguments. </blockquote></div><div>�<br>According to <a href="http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v2.5.1/rabbitmq-dotnet-client-2.5.1-user-guide.pdf" target="_blank">http://www.rabbitmq.com/releases/rabbitmq-dotnet-client/v2.5.1/rabbitmq-dotnet-client-2.5.1-user-guide.pdf</a>, QueueDeclare takes at least 4 arguments: name, durability, exclusivity and auto-deletion setting. Why don&#39;t you just follow examples from that user guide, it seems to be pretty extensive and includes code examples.<br>


<br></div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">My question is 1) can i declare multiple queues to then use fanout exchange and publish a message to multiple queues?</blockquote>


</div><div><br>Yes.<br>�</div><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">2) what is the last argument for QueueBind?</blockquote>
</div></div><br>Binding arguments. More about bindings can be found in AMQP 0.9.1 spec document (introductory chapters are a pretty easy read) <a href="http://bit.ly/hw2ELX" target="_blank">http://bit.ly/hw2ELX</a>.<div><div>
</div><div class="h5"><br clear="all">

<br>-- <br>MK<br><br><a href="http://github.com/michaelklishin" target="_blank">http://github.com/michaelklishin</a><br><a href="http://twitter.com/michaelklishin" target="_blank">http://twitter.com/michaelklishin</a><br>


<br>
</div></div></blockquote></div><br>