Closed ColinBe95 closed 2 days ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @EldertGrootenboer.
Thank you for the feedback @ColinBe95. We will investigate and get back to you asap.
btw this behavior is not limited to async, i.e. it is reproducible with the synchronous client. This code snippet works:
from azure.servicebus import ServiceBusClient
connection_string = os.environ["ASB_NAMESPACE_CONNECTION_STRING"]
queue_name = "test-queue"
with ServiceBusClient.from_connection_string(connection_string) as client:
with client.get_queue_receiver(queue_name) as receiver:
messages = receiver.receive_messages(max_message_count=1)
receiver.dead_letter_message(messages[0])
While the following does not:
with ServiceBusClient.from_connection_string(connection_string) as client:
with client.get_queue_receiver(queue_name) as receiver:
messages = receiver.receive_messages(max_message_count=1)
with client.get_queue_receiver(queue_name) as receiver:
receiver.dead_letter_message(messages[0])
I think I have found the solution to my initial question myself in this discussion https://github.com/Azure/azure-service-bus/issues/455 . However, I still believe raising an exception here would have been a better experience for the developer?
@ColinBe95 yes this is a bug on our end, there should be at the minimum an exception raised or alternate means of sending the message over the dead letter queue. Ill update this thread once we have a PR ready to go
@kashifkhan cool, thank you!
@ColinBe95 I have included a link to the PR that addresses this issue. Ill be marking this issue as addressed but will update here when we push this out to pypi
Hi @ColinBe95. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.
Hi @ColinBe95, since you haven’t asked that we /unresolve
the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve
to reopen the issue.
connection_string = os.environ["ASB_NAMESPACE_CONNECTION_STRING"] queue_name = "test-queue"
async with ServiceBusClient.from_connection_string(connection_string) as client: async with client.get_queue_receiver(queue_name) as receiver: messages = await receiver.receive_messages(max_message_count=1) await receiver.dead_letter_message(messages[0])
async with ServiceBusClient.from_connection_string(connection_string) as client: async with client.get_queue_receiver(queue_name) as receiver: messages = await receiver.receive_messages(max_message_count=1)