You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by di...@apache.org on 2019/06/17 07:25:27 UTC

[rocketmq-ons] 01/01: Fix the issue that exception callback can not be called when doing async sending message with null topic

This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch fix_async_send
in repository https://gitbox.apache.org/repos/asf/rocketmq-ons.git

commit 7af9b5793010069d49ff720c397c924a5a598fc1
Author: ShannonDing <li...@163.com>
AuthorDate: Mon Jun 17 15:25:04 2019 +0800

    Fix the issue that exception callback can not be called when doing async sending message with null topic
---
 .../org/apache/rocketmq/ons/api/impl/rocketmq/ProducerImpl.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ons-core/ons-client/src/main/java/org/apache/rocketmq/ons/api/impl/rocketmq/ProducerImpl.java b/ons-core/ons-client/src/main/java/org/apache/rocketmq/ons/api/impl/rocketmq/ProducerImpl.java
index bd1dede..6118435 100644
--- a/ons-core/ons-client/src/main/java/org/apache/rocketmq/ons/api/impl/rocketmq/ProducerImpl.java
+++ b/ons-core/ons-client/src/main/java/org/apache/rocketmq/ons/api/impl/rocketmq/ProducerImpl.java
@@ -192,11 +192,11 @@ public class ProducerImpl extends ONSClientAbstract implements Producer {
 
             @Override
             public void onException(Throwable e) {
-                String topic = new String(message.getTopic());
+                //String topic = new String(message.getTopic());
                 String msgId = new String(message.getMsgID());
-                ONSClientException onsEx = checkProducerException(topic, msgId, e);
+                ONSClientException onsEx = checkProducerException(message.getTopic(), msgId, e);
                 OnExceptionContext context = new OnExceptionContext();
-                context.setTopic(topic);
+                context.setTopic(message.getTopic());
                 context.setMessageId(msgId);
                 context.setException(onsEx);
                 sendCallback.onException(context);