Skip to content

Commit

Permalink
[ServiceBus] Prepare for release (#19128)
Browse files Browse the repository at this point in the history
* fix api shape

* update sample readme link
  • Loading branch information
yunhaoling authored Jun 7, 2021
1 parent 87faaad commit 1dcfef1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
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

0 comments on commit 1dcfef1

Please sign in to comment.