So one possible way to fix the issue is updating the underlying C API to making messaging_delivery_rejected accpet fields which is a type of AMQP_VALUE.
being
AMQP_VALUE messaging_delivery_rejected(const char* error_condition, const char* error_description, fields erorr_info)
In ServiceBus v0.50.2 and before, dead_letter doesn't populate the description to the service side when using
message.reject()
method. This is because description is not populated into error.info, only populated in error.description: https://github.com/Azure/azure-uamqp-python/blob/803810434d5696b42641abfea9074069be446c29/src/vendor/azure-uamqp-c/src/messaging.c#L181-L198To populate the description properly, need to call
error_set_info
https://github.com/Azure/azure-uamqp-python/blob/803810434d5696b42641abfea9074069be446c29/src/vendor/azure-uamqp-c/src/amqp_definitions.c#L571Besides, there're other properties missed for ServiceBus: DeadLetterReason, propertiesToModify.
.Net AmqpReceiver in ServiceBus is doing this: https://github.com/Azure/azure-sdk-for-net/blob/81d6ed42d456bbb3b02eeec8253f93fc1c519a3f/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpReceiver.cs#L584-L619
So one possible way to fix the issue is updating the underlying C API to making
messaging_delivery_rejected
accpetfields
which is a type ofAMQP_VALUE
.being
AMQP_VALUE messaging_delivery_rejected(const char* error_condition, const char* error_description, fields erorr_info)