Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ServiceBus] Doc and sample fix #13013

Merged
merged 2 commits into from
Aug 12, 2020
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
2 changes: 1 addition & 1 deletion sdk/servicebus/azure-servicebus/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

* Added new properties to Message, PeekMessage and ReceivedMessage: `content_type`, `correlation_id`, `label`,
`message_id`, `reply_to`, `reply_to_session_id` and `to`. Please refer to the docstring for further information.
* Added new properties to PeekedMessaged and ReceivedMessage: `enqueued_sequence_number`, `dead_letter_error_description`,
* Added new properties to PeekMessage and ReceivedMessage: `enqueued_sequence_number`, `dead_letter_error_description`,
`dead_letter_reason`, `dead_letter_source`, `delivery_count` and `expires_at_utc`. Please refer to the docstring for further information.
* Added support for sending received messages via `ServiceBusSender.send_messages`.
* Added `on_lock_renew_failure` as a parameter to `AutoLockRenew.register`, taking a callback for when the lock is lost non-intentially (e.g. not via settling, shutdown, or autolockrenew duration completion).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
async def message_processing(servicebus_client, queue_name):
while True:
try:
async with servicebus_client.get_queue_session_receiver(queue_name, idle_timeout=1) as receiver:
async with servicebus_client.get_queue_session_receiver(queue_name, max_wait_time=1) as receiver:
renewer = AutoLockRenew()
renewer.register(receiver.session)
await receiver.session.set_session_state("OPEN")
Expand All @@ -38,7 +38,7 @@ async def message_processing(servicebus_client, queue_name):
if str(message) == 'shutdown':
await receiver.session.set_session_state("CLOSED")
break
await renewer.shutdown()
await renewer.close()
except NoActiveSession:
print("There are no non-empty sessions remaining; exiting. This may present as a UserError in the azure portal.")
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def message_processing(sb_client, queue_name, messages):
message.complete()
if str(message) == 'shutdown':
receiver.session.set_session_state("CLOSED")
renewer.shutdown()
renewer.close()
except NoActiveSession:
print("There are no non-empty sessions remaining; exiting. This may present as a UserError in the azure portal.")
return
Expand Down