use of com.navercorp.pinpoint.plugin.rocketmq.field.accessor.ChannelTablesGetter in project pinpoint by naver.
the class DefaultMQPushConsumerImplStartInterceptor method after.
@Override
public void after(Object target, Object[] args, Object result, Throwable throwable) {
DefaultMQPushConsumerImpl consumerImpl = (DefaultMQPushConsumerImpl) target;
MessageListener messageListener = consumerImpl.getDefaultMQPushConsumer().getMessageListener();
MQClientInstanceGetter mqClientInstanceGetter = (MQClientInstanceGetter) target;
MQClientInstance mqClientInstance = mqClientInstanceGetter._$PINPOINT$_getMQClientInstance();
RemotingClient remotingClient = mqClientInstance.getMQClientAPIImpl().getRemotingClient();
if (remotingClient instanceof NettyRemotingClient) {
ChannelTablesGetter nettyRemotingClient = (ChannelTablesGetter) remotingClient;
ChannelTablesAccessor channelTablesAccessor = (ChannelTablesAccessor) messageListener;
channelTablesAccessor._$PINPOINT$_setChannelTables(nettyRemotingClient._$PINPOINT$_getChannelTables());
}
}
Aggregations