public void Handle(ReplicationMessage.ReplicaLogPositionAck message) {
			if (_subscriptions.TryGetValue(message.SubscriptionId, out var subscription)) {
				Interlocked.Exchange(ref subscription.AckedLogPosition, message.ReplicationLogPosition);
				if (subscription.IsPromotable) {
					_publisher.Publish(new ReplicationTrackingMessage.ReplicaWriteAck(message.SubscriptionId,message.ReplicationLogPosition));
				}
			}
		}
Esempio n. 2
0
        public void Handle(ReplicationMessage.ReplicaLogPositionAck message)
        {
            ReplicaSubscription subscription;

            if (_subscriptions.TryGetValue(message.SubscriptionId, out subscription))
            {
                Interlocked.Exchange(ref subscription.AckedLogPosition, message.ReplicationLogPosition);
            }
        }