<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 12pt; color: #000000'><span id="result_box" class="" lang="en"><span class="hps">I'm testing</span> <span class="hps">the</span> <span class="hps">Exchange</span> <span class="hps">to</span> <span class="hps">Exchange</span> <span class="hps">Bindings</span> <span class="hps">extension</span> <span class="hps">but the queue</span> <span class="hps">does not receive</span> <span class="hps">the messages.</span> <span class="hps">any idea</span> <span class="hps">why?</span><br> <span class="hps">this is my code</span><span class="">:<br><br> ConnectionFactory factory = new ConnectionFactory();<br> factory.setHost("localhost");<br> Connection connection = factory.newConnection();<br> Channel channel = connection.createChannel();<br><br> channel.exchangeDeclare("ex1", "fanout");<br> channel.exchangeDeclare("ex2", "fanout");<br> channel.exchangeBind("ex1", "ex2", "");<br><br> channel.queueDeclare("queue", false, false, false, null);<br> channel.queueBind("queue", "ex2", "");<br><br> String message = "msg";<br><br> channel.basicPublish("ex1", "", null, message.getBytes());<br> System.out.println(" [x] Sent '" + message + "'");<br><br> channel.close();<br> connection.close();<br><br></span></span><span id="result_box" class="short_text" lang="en"><span class="hps">regards,<br>Yuri<br></span></span></div>
<br><html>
<body>
<a href="http://www.uci.cu/">
<img src="http://universidad.uci.cu/email.gif"/>
</body>
</html>
<br></body></html>