[BUG] Service Bus ServiceBusReceiverClient stop receiving message in a new thread #27578
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Service Bus
Projects
Milestone
Describe the bug
When use
ServiceBusReceiverClient.receiveMessages(int maxMessages)
to synchronous receive message on thread-1, kill this thread in the middle of iterating the received messages. Then bring up a new thread-2 to receive messages, the receiver client doesn't retrieve any messages.To Reproduce
Repro is not stable, only happened sometimes:
Code Snippet
Repro test code:
https://github.com/conniey/servicebus-demo/blob/main/src/main/java/org/example/SyncReceiveThrows.java
Exception or Stack Trace
Note that logs doesn't have message "Current work updated" for work[2] here, which means work[2] haven't been updated to execute.
Expected behavior
Receiver should keep receiving message in the new thread.
Setup (please complete the following information):
Additional context
This issue are not in azure-messaging-servicebus:7.4.2
The text was updated successfully, but these errors were encountered: