You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/05/12 09:43:16 UTC

[GitHub] [rocketmq-spring] Bin2020 opened a new issue #365: RocketMQTemplate与DefaultMQProducer sendStatus应答结果不一致

Bin2020 opened a new issue #365:
URL: https://github.com/apache/rocketmq-spring/issues/365


   broker 1主1从同步双写,从broker宕机,发送同步消息。RocketMQTemplate应答SEND_OK,DefaultMQProducer应答SLAVE_NOT_AVAILABLE,为什么
   
   ```
   SendResult sendResult = rocketMQTemplate.syncSend("testTopic", "test");
   System.out.println(sendResult.getSendStatus()); // SEND_OK
   DefaultMQProducer producer = new TransactionMQProducer("my-group2");
   producer.setNamesrvAddr("127.0.0.1:9876");
   producer.start();
   
   org.apache.rocketmq.common.message.Message msg = new org.apache.rocketmq.common.message.Message("testTopic", "test".getBytes(StandardCharsets.UTF_8));
   SendResult sendResult2 = producer.send(msg);
   System.out.println(sendResult2.getSendStatus()); // SLAVE_NOT_AVAILABLE
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-spring] odbozhou closed issue #365: The response results of rocketmqtemplate and defaultmqproducer sendstatus are inconsistent

Posted by GitBox <gi...@apache.org>.
odbozhou closed issue #365:
URL: https://github.com/apache/rocketmq-spring/issues/365


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-spring] RongtongJin commented on issue #365: The response results of rocketmqtemplate and defaultmqproducer sendstatus are inconsistent

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #365:
URL: https://github.com/apache/rocketmq-spring/issues/365#issuecomment-917536210


   > 在org.apache.rocketmq.spring.support.RocketMQUtil#getAndWrapMessage方法下,WAIT_STORE_MSG_OK默认为false,但是设计上应该是想默认true的,是BUG吧。
   > 
   > ```
   > Object waitStoreMsgOkObj = headers.getOrDefault("WAIT_STORE_MSG_OK", "true");
   > rocketMsg.setWaitStoreMsgOK(Boolean.TRUE.equals(waitStoreMsgOkObj)); // Boolean.TRUE.equals("true") always false
   > ```
   
   这确实是个bug,有兴趣提交一个pr来修复它吗?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-spring] Bin2020 commented on issue #365: The response results of rocketmqtemplate and defaultmqproducer sendstatus are inconsistent

Posted by GitBox <gi...@apache.org>.
Bin2020 commented on issue #365:
URL: https://github.com/apache/rocketmq-spring/issues/365#issuecomment-844809132


   在org.apache.rocketmq.spring.support.RocketMQUtil#getAndWrapMessage方法下,WAIT_STORE_MSG_OK默认为false,但是设计上应该是想默认true的,是BUG吧。
   ```
   Object waitStoreMsgOkObj = headers.getOrDefault("WAIT_STORE_MSG_OK", "true");
   rocketMsg.setWaitStoreMsgOK(Boolean.TRUE.equals(waitStoreMsgOkObj)); // Boolean.TRUE.equals("true") always false
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org