// restart using existing msg handler
messageHandler = existedMsgHandler;
} else {
// some has started delivery but not stop it
if (null != existedMsgHandler) {
throw new AlreadyStartDeliveryException("A message handler has been started for topic subscriber " + topicSubscriber);
}
if (messageHandler != null) {
if (null != topicSubscriber2MessageHandler.putIfAbsent(topicSubscriber, messageHandler)) {
throw new AlreadyStartDeliveryException("Someone is also starting delivery for topic subscriber " + topicSubscriber);
}
}
}
HedwigClientImpl.getResponseHandlerFromChannel(topicSubscriberChannel).getSubscribeResponseHandler()
.setMessageHandler(messageHandler);