private TcpPackage WrapReplicaSubscribed(ReplicationMessage.ReplicaSubscribed msg)
        {
            var dto = new ReplicationMessageDto.ReplicaSubscribed(msg.LeaderId.ToByteArray(),
                                                                  msg.SubscriptionId.ToByteArray(),
                                                                  msg.SubscriptionPosition);

            return(new TcpPackage(TcpCommand.ReplicaSubscribed, Guid.NewGuid(), dto.Serialize()));
        }
 private void Handle(ReplicationMessage.ReplicaSubscribed message)
 {
     if (IsLegitimateReplicationMessage(message))
     {
         _outputBus.Publish(message);
         _fsm.Handle(new SystemMessage.BecomeCatchingUp(_stateCorrelationId, _master));
     }
 }