Thanks MK. I was able to compile successfully. I've coded something
below. I've provided an invalid routing key so I'm assuming it should
be listening and doing the "handleReturn" but I don't feel it's doing
that. Going to do more analysis and testing to be for certain.
channel.addReturnListener(new ReturnListener()
{
public void handleReturn(int replyCode, String replyText, String
exchange, String routingKey, AMQP.BasicProperties properties, byte[]
body) throws IOException
{
String str_successflag = "false";
String detailMsg = "Could not publish the message using
exchange:"+exchange+" "+"and "+"routing key:"+routingKey;
}
});
channel.basicPublish(strExchangeName, strRoutingKey, props, byteMessage);