transaction.setGateway(gateway);
gateway.addMessageListener(transaction);
SystemAcknowledgementHandler sys = new SystemAcknowledgementHandler();
NettyAcknowledgementListenerAndInterceptor acknowledgement = new NettyAcknowledgementListenerAndInterceptor();
acknowledgement.setHandler(sys);
acknowledgement.setGateway(gateway);
acknowledgement.setAckTimeoutMillis(200);
gateway.addMessageListener(acknowledgement);
gateway.addOutgoingMessageInterceptor(acknowledgement);
NettyReceiptListener receipt = new NettyReceiptListener();
receipt.setGateway(gateway);