ConsumerState newState = (ConsumerState)ns;
String oldConsumerID = consumerID;
consumerID = newState.consumerID;
CallbackManager oldCallbackManager = ((ClientConnectionDelegate)getParent().getParent().
getDelegate()).getRemotingConnection().getCallbackManager();
CallbackManager newCallbackManager = ((ClientConnectionDelegate)ns.getParent().getParent().
getDelegate()).getRemotingConnection().getCallbackManager();
// We need to synchronize the old message callback handler using the new one
ClientConsumer handler = oldCallbackManager.unregisterHandler(oldConsumerID);
ClientConsumer newHandler = newCallbackManager.unregisterHandler(consumerID);
handler.synchronizeWith(newHandler);
newCallbackManager.registerHandler(consumerID, handler);
}