Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client isn't being notified if message is not delivered #802

Closed
EdwardSkrobala opened this issue Nov 20, 2019 · 0 comments · Fixed by #1568
Closed

Client isn't being notified if message is not delivered #802

EdwardSkrobala opened this issue Nov 20, 2019 · 0 comments · Fixed by #1568
Labels
bug Something isn't working

Comments

@EdwardSkrobala
Copy link

Summary

Our team faced up with issue on our production environment - after RabbitMQ maintance all queues were deleted and our client is still publishing messages without any error.
We've prepared a short Pub/Sub demo reproducing it (https://github.com/EdwardSkrobala/MqttIssue).

Publisher & Subscriber connect to broker via websockets, publisher sends message every 5 sec with Qos-1 level set.
We need publisher to be acknowledged if it publishes message that is not delivered to subscriber.

Environment:

Steps to reproduce:

  • Run docker-compose -f docker-compose-brokers.yml up from root folder
  • Run dotnet run from project folder (src/Test/)
  • Trigger management UI - http://localhost:15672/#/queues (username="test", pass="test")
  • Delete Queue mqtt-subscription-subscriberqos1 to simulate maintance on server.

Code lines showing issue

Message configuration
var message = new MqttApplicationMessageBuilder() .WithTopic("MyTopic") .WithPayload($"Hello World [{DateTime.Now.ToLongTimeString()}]") .WithQualityOfServiceLevel(MQTTnet.Protocol.MqttQualityOfServiceLevel.AtLeastOnce) .WithRetainFlag(false) .Build()
PublishAsync returns MqttClientPublishResult containing MqttClientPublishReasonCode (https://github.com/chkr1011/MQTTnet/blob/master/Source/MQTTnet/Client/Publishing/MqttClientPublishResult.cs)
var publishResult = await publisherClient.PublishAsync(message)

Expected result:
Exception or MqttClientPublishResult.ReasonCode = MqttClientPublishReasonCode.NoMatchingSubscribers

Actual result:
MqttClientPublishResult.ReasonCode = Success

Thanks in advance for the assistance

@EdwardSkrobala EdwardSkrobala added the bug Something isn't working label Nov 20, 2019
@chkr1011 chkr1011 linked a pull request Nov 9, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant