[BUG] Service Bus Message receiver removes message from queue but message is not received
See original GitHub issueLibrary name and version
Azure.Messaging.ServiceBus 7.6.0
Describe the bug
If there is already a message in the queue before the app starts the message is removed from the queue when ReceiveMessageAsync is called but the message is not returned so it is lost!
Subsequent messages are received.
This happens with all versions. It works fine locally.
Using Microsoft.Azure.ServiceBus also works fine.
Expected behavior
Message should be received
Actual behavior
Message is lost
Reproduction Steps
c# console app in kubernetes v1.21.7
add a message to the queue before the app is running
var _serviceBusClient = new ServiceBusClient(serviceBusConnectionString);
var _messageReceiver = _serviceBusClient.CreateReceiver(queuename);
var message = await _messageReceiver.ReceiveMessageAsync();
Environment
Azure Kubernetes v 1.21.7 .net 6 (same issue netcore3.1)
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Unable to receive some messages from Service Bus Queue
When you are using peekLock mode you observe that some of the messages are not received by your receiver application and restarting the...
Read more >Some messages are getting deleted but not received - ...
It means that the moment a message is requested from the broker and delivered to the client, it will be immediately removed from...
Read more >Azure Service Bus and its Complete Overview
Messages are sent to a topic in the same way they are sent to a queue, but messages are not received from the...
Read more >azure-servicebus
RECEIVE_AND_DELETE mode removes the message from the queue on receipt. ServiceBusReceivedMessage messages returned from peek_messages() cannot be settled, as ...
Read more >Azure Service Bus client library for .NET
Azure Service Bus provides flexible, brokered messaging between client and ... The receiver allows you to receive messages from a queue or subscription....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If the receiver is actively receiving messages, then the DeliveryCount will be incremented as the receiver is able to settle the message. If the link is just open, but no receives are happening, the message will be released when it is delivered and it will not impact the delivery count.
Even if MaxDeliveryCount is reached?