Hello,<div><br></div><div>I have a problem with ReturnListener - failed messages are not invoking it in Linux.&nbsp;</div><div><br></div><div>Same code works fine in Windows.</div><div><br></div><div>I've created a test Java class which tries to publish message into a fake queue.&nbsp;</div><div>In Windows this message is failing, and ReturnListener shows it's output. In Linux there're not error or fails.</div><div><br></div><div>I've just upgraded rabbitmq from 2.8.6 to 3.0.1 on both WIndows and Linux machines.<br></div><div><br></div><div>Code is following:</div><div><br></div><div><div>package my.test.rabbitmq;</div><div><br></div><div>import com.rabbitmq.client.AMQP;</div><div>import com.rabbitmq.client.Channel;</div><div>import com.rabbitmq.client.Connection;</div><div>import com.rabbitmq.client.ConnectionFactory;</div><div>import com.rabbitmq.client.ReturnListener;</div><div><br></div><div>import java.io.IOException;</div><div><br></div><div>public class RabbitMQReturn</div><div>{</div><div><br></div><div>&nbsp; &nbsp; public static void main(String[] args) throws Exception</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ConnectionFactory factory = new ConnectionFactory();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; factory.setHost("localhost");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; factory.setUsername("testusr");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; factory.setPassword("testpwd");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; factory.setPort(5672);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; Connection connection = factory.newConnection();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; final Channel channel = connection.createChannel();</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; channel.addReturnListener(new ReturnListener()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void handleReturn(int i, String s, String s2, String s3, AMQP.BasicProperties basicProperties,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; byte[] bytes) throws IOException</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.err.println("Sending failed: " + s + " [" + i + "]");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; });</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; AMQP.BasicProperties props = new AMQP.BasicProperties("application/octet-stream",</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; null,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; null,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0, null, null, null,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; null, null, null, null,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; null, null);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; channel.basicPublish("", "fake_queue_112233", true, true, props, "Test String".getBytes());</div><div>&nbsp; &nbsp; }</div><div>}</div></div><div><br></div><div><br></div>