mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-24 16:04:00 +08:00
[ISSUE #3370] group same Exceptions
Co-authored-by: shizhili <shizhili@cmss.chinamobile.com>
This commit is contained in:
@@ -611,14 +611,7 @@ public class MQClientAPIImpl {
|
||||
request.setOpaque(RemotingCommand.createNewRequestId());
|
||||
sendMessageAsync(addr, retryBrokerName, msg, timeoutMillis, request, sendCallback, topicPublishInfo, instance,
|
||||
timesTotal, curTimes, context, producer);
|
||||
} catch (InterruptedException e1) {
|
||||
onExceptionImpl(retryBrokerName, msg, timeoutMillis, request, sendCallback, topicPublishInfo, instance, timesTotal, curTimes, e1,
|
||||
context, false, producer);
|
||||
} catch (RemotingConnectException e1) {
|
||||
producer.updateFaultItem(brokerName, 3000, true);
|
||||
onExceptionImpl(retryBrokerName, msg, timeoutMillis, request, sendCallback, topicPublishInfo, instance, timesTotal, curTimes, e1,
|
||||
context, true, producer);
|
||||
} catch (RemotingTooMuchRequestException e1) {
|
||||
} catch (InterruptedException | RemotingTooMuchRequestException e1) {
|
||||
onExceptionImpl(retryBrokerName, msg, timeoutMillis, request, sendCallback, topicPublishInfo, instance, timesTotal, curTimes, e1,
|
||||
context, false, producer);
|
||||
} catch (RemotingException e1) {
|
||||
|
||||
@@ -896,11 +896,7 @@ public class MQClientInstance {
|
||||
try {
|
||||
this.mQClientAPIImpl.unregisterClient(addr, this.clientId, producerGroup, consumerGroup, clientConfig.getMqClientApiTimeout());
|
||||
log.info("unregister client[Producer: {} Consumer: {}] from broker[{} {} {}] success", producerGroup, consumerGroup, brokerName, entry1.getKey(), addr);
|
||||
} catch (RemotingException e) {
|
||||
log.error("unregister client exception from broker: " + addr, e);
|
||||
} catch (InterruptedException e) {
|
||||
log.error("unregister client exception from broker: " + addr, e);
|
||||
} catch (MQBrokerException e) {
|
||||
} catch (RemotingException | InterruptedException | MQBrokerException e) {
|
||||
log.error("unregister client exception from broker: " + addr, e);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-21
@@ -622,14 +622,7 @@ public class DefaultMQProducerImpl implements MQProducerInner {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} catch (RemotingException e) {
|
||||
endTimestamp = System.currentTimeMillis();
|
||||
this.updateFaultItem(mq.getBrokerName(), endTimestamp - beginTimestampPrev, true);
|
||||
log.warn(String.format("sendKernelImpl exception, resend at once, InvokeID: %s, RT: %sms, Broker: %s", invokeID, endTimestamp - beginTimestampPrev, mq), e);
|
||||
log.warn(msg.toString());
|
||||
exception = e;
|
||||
continue;
|
||||
} catch (MQClientException e) {
|
||||
} catch (RemotingException | MQClientException e) {
|
||||
endTimestamp = System.currentTimeMillis();
|
||||
this.updateFaultItem(mq.getBrokerName(), endTimestamp - beginTimestampPrev, true);
|
||||
log.warn(String.format("sendKernelImpl exception, resend at once, InvokeID: %s, RT: %sms, Broker: %s", invokeID, endTimestamp - beginTimestampPrev, mq), e);
|
||||
@@ -888,19 +881,7 @@ public class DefaultMQProducerImpl implements MQProducerInner {
|
||||
}
|
||||
|
||||
return sendResult;
|
||||
} catch (RemotingException e) {
|
||||
if (this.hasSendMessageHook()) {
|
||||
context.setException(e);
|
||||
this.executeSendMessageHookAfter(context);
|
||||
}
|
||||
throw e;
|
||||
} catch (MQBrokerException e) {
|
||||
if (this.hasSendMessageHook()) {
|
||||
context.setException(e);
|
||||
this.executeSendMessageHookAfter(context);
|
||||
}
|
||||
throw e;
|
||||
} catch (InterruptedException e) {
|
||||
} catch (RemotingException | MQBrokerException | InterruptedException e) {
|
||||
if (this.hasSendMessageHook()) {
|
||||
context.setException(e);
|
||||
this.executeSendMessageHookAfter(context);
|
||||
|
||||
Reference in New Issue
Block a user