Skip to content

Commit

Permalink
resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
karsonto committed Jan 16, 2024
2 parents 24dab1a + da6c96f commit df92b6f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ private void injectHttpRequestHeader(final ChannelHandlerContext ctx, final Http

private void processHttpCommandRequest(final ChannelHandlerContext ctx, final AsyncContext<HttpCommand> asyncContext) {
final HttpCommand request = asyncContext.getRequest();

final HttpRequestProcessor choosed = httpRequestProcessorTable.get(request.getRequestCode());
Runnable runnable = () -> {
try {
Expand Down Expand Up @@ -426,6 +425,7 @@ private void processHttpCommandRequest(final ChannelHandlerContext ctx, final As
if (!asyncContext.isComplete()) {
return;
}

log.debug("{}", asyncContext.getResponse());
metrics.getSummaryMetrics()
.recordHTTPReqResTimeCost(System.currentTimeMillis() - request.getReqTime());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ public void handler(final HandlerService.HandlerSpecific handlerSpecific, final
} catch (Exception e) {
log.error("message|eventMesh2mq|REQ|ASYNC|send2MQCost={}ms"
+ "|topic={}|url={}", System.currentTimeMillis() - startTime, JsonUtils.toJSONString(unSubTopicList), unSubscribeUrl, e);

handlerSpecific.sendErrorResponse(EventMeshRetCode.EVENTMESH_UNSUBSCRIBE_ERR, responseHeaderMap,
responseBodyMap, null);
}
Expand All @@ -213,6 +214,7 @@ public void handler(final HandlerService.HandlerSpecific handlerSpecific, final
eventMeshHTTPServer.getSubscriptionManager().getLocalConsumerGroupMapping().keySet()
.removeIf(s -> StringUtils.equals(consumerGroup, s));
} catch (Exception e) {

log.error("message|eventMesh2mq|REQ|ASYNC|send2MQCost={}ms"
+ "|topic={}|url={}", System.currentTimeMillis() - startTime, JsonUtils.toJSONString(unSubTopicList), unSubscribeUrl, e);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public void processRequest(final ChannelHandlerContext ctx, final AsyncContext<H

@Override
public void onSuccess(final CloudEvent event) {

log.info("message|mq2eventMesh|RSP|SYNC|rrCost={}ms|topic={}"
+ "|bizSeqNo={}|uniqueId={}", System.currentTimeMillis() - startTime, topic, bizNo, uniqueId);

Expand Down Expand Up @@ -263,15 +263,10 @@ public void onException(final Throwable e) {
asyncContext.onComplete(err, handler);

eventMeshHTTPServer.getHttpRetryer().newTimeout(sendMessageContext, 10, TimeUnit.SECONDS);
<<<<<<<HEAD

log.error("message|mq2eventMesh|RSP|SYNC|rrCost={}ms|topic={}"
+ "|bizSeqNo={}|uniqueId={}", System.currentTimeMillis() - startTime, topic, bizNo, uniqueId, e);
=======
LogUtils.error(log, "message|mq2eventMesh|RSP|SYNC|rrCost={}ms|topic={}"
+ "|bizSeqNo={}|uniqueId={}",
System.currentTimeMillis() - startTime,
topic, bizNo, uniqueId, e);
>>>>>>>da6c96f3f...fix code style

}
}, Integer.parseInt(ttl));
} catch (Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public void processRequest(final ChannelHandlerContext ctx, final AsyncContext<H
EventMeshRetCode.EVENTMESH_SUBSCRIBE_ERR.getErrMsg() + EventMeshUtil.stackTrace(e, 2),
SubscribeResponseBody.class);
final long endTime = System.currentTimeMillis();

log.error("message|eventMesh2mq|REQ|ASYNC|send2MQCost={}ms|topic={}|bizSeqNo={}|uniqueId={}",
endTime - startTime, JsonUtils.toJSONString(subscribeRequestBody.getTopics()), subscribeRequestBody.getUrl(), e);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ public Executor executor() {
return eventMeshHTTPServer.getHttpThreadPoolGroup().getClientManageExecutor();
}


private void registerClient(final UnSubscribeRequestHeader unSubscribeRequestHeader, final String consumerGroup,
final List<String> topicList,
final String url) {
final List<String> topicList, final String url) {
for (final String topic : topicList) {
final Client client = new Client();
client.setEnv(unSubscribeRequestHeader.getEnv());
Expand Down

0 comments on commit df92b6f

Please sign in to comment.