Skip to content

Migration Question: ConsumerCancelled Event in Version 7.1.2 #1853

Discussion options

You must be logged in to vote

@MohammadAminPourmoradian the event in question has a dedicated test suite.

string notifiedConsumerTag = null;
consumer.UnregisteredAsync += (sender, args) =>
{
    notifiedConsumerTag = args.ConsumerTags.First();
    _tcs.TrySetResult(true);
    return Task.CompletedTask;
};

await _channel.QueueDeleteAsync(q1);
await WaitAsync(_tcs, "ConsumerCancelled event");
Assert.Equal(consumerTag1, notifiedConsumerTag);

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lukebakken
Comment options

@michaelklishin
Comment options

@michaelklishin
Comment options

Answer selected by michaelklishin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants