Search in sources :

Example 1 with MergeMessage

use of io.seata.core.protocol.MergeMessage in project seata by seata.

the class AbstractNettyRemotingClient method sendAsyncRequest.

@Override
public void sendAsyncRequest(Channel channel, Object msg) {
    if (channel == null) {
        LOGGER.warn("sendAsyncRequest nothing, caused by null channel.");
        return;
    }
    RpcMessage rpcMessage = buildRequestMessage(msg, msg instanceof HeartbeatMessage ? ProtocolConstants.MSGTYPE_HEARTBEAT_REQUEST : ProtocolConstants.MSGTYPE_RESQUEST_ONEWAY);
    if (rpcMessage.getBody() instanceof MergeMessage) {
        mergeMsgMap.put(rpcMessage.getId(), (MergeMessage) rpcMessage.getBody());
    }
    super.sendAsync(channel, rpcMessage);
}
Also used : HeartbeatMessage(io.seata.core.protocol.HeartbeatMessage) RpcMessage(io.seata.core.protocol.RpcMessage) MergeMessage(io.seata.core.protocol.MergeMessage)

Aggregations

HeartbeatMessage (io.seata.core.protocol.HeartbeatMessage)1 MergeMessage (io.seata.core.protocol.MergeMessage)1 RpcMessage (io.seata.core.protocol.RpcMessage)1