I am following this https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-how-to-use-topics-subscriptions to learn how to use Service Bus Topic and Subscriptions to receive messages.
It 1st sends 10 messages and then receives the 10 messages.
However, once I finished coding and ran the code, the 10 messages were sent, but I only received 8 of them, there were 2 of messages still in the subscription.
Could anyone enlighten me on
- why this happened?
- Is it okay to happen?
- how to prevent it from happening again?
- once happened, what is the best practice to handle this situation?