Skip to content

Commit

Permalink
[ISSUE apache#3411] Do some code optimization[ReplyMessageProcessor] (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
cnzakii authored May 6, 2024
1 parent e349def commit af1c041
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ public ReplyMessageProcessor(EventMeshHTTPServer eventMeshHTTPServer) {

@Override
public void processRequest(ChannelHandlerContext ctx, AsyncContext<HttpCommand> asyncContext) throws Exception {
HttpCommand responseEventMeshCommand;
String localAddress = IPUtils.getLocalAddress();
HttpCommand request = asyncContext.getRequest();
final String channelRemoteAddr = RemotingHelper.parseChannelRemoteAddr(ctx.channel());
cmdLogger.info("cmd={}|{}|client2eventMesh|from={}|to={}", RequestCode.get(Integer.valueOf(request.getRequestCode())),
EventMeshConstants.PROTOCOL_HTTP,
RemotingHelper.parseChannelRemoteAddr(ctx.channel()), localAddress);
channelRemoteAddr, localAddress);

ReplyMessageRequestHeader replyMessageRequestHeader = (ReplyMessageRequestHeader) request.getHeader();

Expand Down Expand Up @@ -167,7 +167,6 @@ public void processRequest(ChannelHandlerContext ctx, AsyncContext<HttpCommand>

try {
// body
// omsMsg.setBody(replyMessageRequestBody.getContent().getBytes(EventMeshConstants.DEFAULT_CHARSET));
event = CloudEventBuilder.from(event)
.withSubject(replyTopic)
.withExtension(EventMeshConstants.MSG_TYPE, EventMeshConstants.PERSISTENT)
Expand Down

0 comments on commit af1c041

Please sign in to comment.