public Task <IMessageDeliveryChecker> SubscribeAsync( string channel, MessageAction onExpectedMessage, MessageAction onMissedMessage = default, MessageAction onDuplicatedMessage = default, MessagesCountAction onMissingMessages = default) { var messageHandler = new MessageHandler(onExpectedMessage, onMissedMessage, onDuplicatedMessage, onMissingMessages); return(_subscriber.SubscribeAsync(channel, messageHandler)); }
public MessageHandler( MessageAction onExpectedMessage, MessageAction onMissedMessage = default, MessageAction onDuplicatedMessage = default, MessagesCountAction onMissingMessages = default) { _onExpectedMessage = onExpectedMessage; _onMissedMessage = onMissedMessage ?? onExpectedMessage; _onDuplicatedMessage = onDuplicatedMessage ?? _noop; _onMissingMessages = onMissingMessages ?? _noop2; }