channel.setOpt(Channel.AUTO_RECONNECT, true);
channel.setOpt(Channel.AUTO_GETSTATE, fetchState);
channel.setOpt(Channel.BLOCK, true);
if (configuration.isUseRegionBasedMarshalling()) {
rpcDispatcher = new InactiveRegionAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(),
spi, invocationContextContainer, interceptorChain, componentRegistry);
} else {
rpcDispatcher = new CommandAwareRpcDispatcher(channel, messageListener, new MembershipListenerAdaptor(),
invocationContextContainer, invocationContextContainer, interceptorChain, componentRegistry);
}