Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #3411] Do some code optimization[ReplyMessageProcessor] #4871

Merged
merged 1 commit into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading