Skip to content

Commit

Permalink
[ISSUE #8963] Fix code36 request sent to ns (#8964)
Browse files Browse the repository at this point in the history
* [ISSUE #8963] Fix code36 request sent to ns

* Update DefaultMQPullConsumerImpl.java
  • Loading branch information
yx9o authored Nov 27, 2024
1 parent fc22830 commit cd5071b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,10 @@ public void sendMessageBack(MessageExt msg, int delayLevel, final String brokerN
String brokerAddr = (null != destBrokerName) ? this.mQClientFactory.findBrokerAddressInPublish(destBrokerName)
: RemotingHelper.parseSocketAddressAddr(msg.getStoreHost());

if (UtilAll.isBlank(brokerAddr)) {
throw new MQClientException("Broker[" + destBrokerName + "] master node does not exist", null);
}

if (UtilAll.isBlank(consumerGroup)) {
consumerGroup = this.defaultMQPullConsumer.getConsumerGroup();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,9 @@ private void sendMessageBack(MessageExt msg, int delayLevel, final String broker
} else {
String brokerAddr = (null != brokerName) ? this.mQClientFactory.findBrokerAddressInPublish(brokerName)
: RemotingHelper.parseSocketAddressAddr(msg.getStoreHost());
if (UtilAll.isBlank(brokerAddr)) {
throw new MQClientException("Broker[" + brokerName + "] master node does not exist", null);
}
this.mQClientFactory.getMQClientAPIImpl().consumerSendMessageBack(brokerAddr, brokerName, msg,
this.defaultMQPushConsumer.getConsumerGroup(), delayLevel, 5000, getMaxReconsumeTimes());
}
Expand Down

0 comments on commit cd5071b

Please sign in to comment.