Using following code to send msg.
producer.send(msg, new SelectMessageQueueByHash(), msgTag, new SendCallback() {
@Override
public void onSuccess(SendResult sendResult) {
}
@Override
public void onException(Throwable throwable) {
getLogger().info(new String(msg.getBody()));
throwable.printStackTrace();
getLogger().error("onException: " + throwable.getLocalizedMessage());
}
});
Strangely , in my log file, only getLogger().error("onException: " +
throwable.getLocalizedMessage()) can be found. Seems the getLogger().info is
not called event the onException is called. Any insight on this?
Thanks,
Lei
[email protected]