<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>&nbsp;ConnectionFactory factory = new ConnectionFactory();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; factory.setHost("localhost");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Connection connection = factory.newConnection();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Channel channel = connection.createChannel();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel.exchangeDeclare("ex1", "fanout");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel.exchangeDeclare("ex2", "fanout");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel.exchangeBind("ex1", "ex2", "");<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel.queueDeclare("queue", false, false, false, null);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel.queueBind("queue", "ex2", "");<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String message = "msg";<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel.basicPublish("ex1", "", null, message.getBytes());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(" [x] Sent '" + message + "'");<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; channel.close();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>