private TcpPackage WrapReplicaSubscriptionRetry(ReplicationMessage.ReplicaSubscriptionRetry msg) { var dto = new ReplicationMessageDto.ReplicaSubscriptionRetry(msg.LeaderId.ToByteArray(), msg.SubscriptionId.ToByteArray()); return(new TcpPackage(TcpCommand.ReplicaSubscriptionRetry, Guid.NewGuid(), dto.Serialize())); }
private void Handle(ReplicationMessage.ReplicaSubscriptionRetry message) { if (IsLegitimateReplicationMessage(message)) { _outputBus.Publish(message); var msg = new ReplicationMessage.SubscribeToMaster(_stateCorrelationId, _master.InstanceId, Guid.NewGuid()); _mainQueue.Publish(TimerMessage.Schedule.Create(MasterSubscriptionRetryDelay, _publishEnvelope, msg)); } }