Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.64k stars 2.84k forks source link

[ServiceBus] accept `application_properties` kwarg in `ServiceBusReceiver.dead_letter_message` #22881

Closed swathipil closed 8 months ago

swathipil commented 2 years ago

Allow user to pass application_properties to ServiceBusReceiver.dead_letter_message. Ensure that this is set on ReceivedMessage received from deadletterqueue.

background

here's the AMQP spec: http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-rejected

image

image

related APIs

sync receiver and async receiver

The api will look like:

    def dead_letter_message(
        self,
        message: ServiceBusReceivedMessage,
        reason: Optional[str] = None,
        error_description: Optional[str] = None,
        properties_to_modify: Optional[dict] = None,  # naming TBD
    ) -> None:

related code details

uamqp should already support setting info field of reject via https://github.com/Azure/azure-uamqp-python/blob/master/uamqp/message.py#L501.

for service bus, it should accept a new keyword argument which is dictionary, and pass it as the info when calling uamqp reject message.

JoshLove-msft commented 2 years ago

Note, the param should be named something like "properties_to_modify" as the user wouldn't need to pass all the application properties.

yunhaoling commented 2 years ago

this is for cross-language feature consistency

github-actions[bot] commented 8 months ago

Hi @swathipil, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.