Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def __init__(self, body, **kwargs):
self.partition_key = kwargs.pop("partition_key", None)

def __str__(self):
# type: () -> str
return str(self.raw_amqp_message)

def __repr__(self):
Expand Down Expand Up @@ -730,8 +731,6 @@ class ServiceBusReceivedMessage(ServiceBusMessage):
"""
A Service Bus Message received from service side.

:ivar raw_amqp_message: Advanced usage only. The internal AMQP message payload that is sent or received.
:vartype raw_amqp_message: ~azure.servicebus.amqp.AmqpAnnotatedMessage
:ivar auto_renew_error: Error when AutoLockRenewer is used and it fails to renew the message lock.
:vartype auto_renew_error: ~azure.servicebus.AutoLockRenewTimeout or ~azure.servicebus.AutoLockRenewFailed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def __init__(self, **kwargs):
self._delivery_annotations = kwargs.get("delivery_annotations")

def __str__(self):
# type: () -> str
return str(self._message)

def __repr__(self):
Expand Down
3 changes: 3 additions & 0 deletions sdk/servicebus/azure-servicebus/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Both [sync version](https://github.com/Azure/azure-sdk-for-python/tree/master/sd
- Receive dead-lettered messages
- [receive_iterator_queue.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/servicebus/azure-servicebus/samples/sync_samples/receive_iterator_queue.py) ([async_version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/servicebus/azure-servicebus/samples/async_samples/receive_iterator_queue_async.py)) - Examples to receive messages from a service bus queue by iterating over ServiceBusReceiver:
- Receive messages by iterating over ServiceBusReceiver
- [send_and_receive_amqp_annotated_message.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/servicebus/azure-servicebus/samples/sync_samples/send_and_receive_amqp_annotated_message.py) ([async_version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/servicebus/azure-servicebus/samples/async_samples/send_and_receive_amqp_annotated_message_async.py)) - Examples to send AMQPAnnotatedMessage to and receive messages from a service bus queue and parse the body:
- Send AMQPAnnotatedMessage of different body types.
- Receive messages and parse the body according to the body type.
- [session_pool_receive.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/servicebus/azure-servicebus/samples/sync_samples/session_pool_receive.py) ([async_version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/servicebus/azure-servicebus/samples/async_samples/session_pool_receive_async.py)) - Examples to receive messages from multiple available sessions in parallel with a thread pool:
- Receive messages from multiple available sessions in parallel with a thread pool
- Automatically renew the lock on the session through AutoLockRenewer
Expand Down