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 - Track2 - Remove timeout from Send #11002

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
1 change: 1 addition & 0 deletions sdk/servicebus/azure-servicebus/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
**Breaking Changes**

* Session receivers are now created via their own top level functions, e.g. `get_queue_sesison_receiver` and `get_subscription_session_receiver`. Non session receivers no longer take session_id as a paramter.
* `ServiceBusSender.send()` no longer takes a timeout parameter, as it should be redundant with retry options provided when creating the client.

## 7.0.0b1 (2020-04-06)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,12 @@ def from_connection_string(
)
return cls(**constructor_args)

def send(self, message, timeout=None):
def send(self, message):
# type: (Union[Message, BatchMessage], float) -> None
"""Sends message and blocks until acknowledgement is received or operation times out.

:param message: The ServiceBus message to be sent.
:type message: ~azure.servicebus.Message
:param float timeout: The maximum wait time to send the event data.
:rtype: None
:raises: ~azure.servicebus.common.errors.MessageSendFailed if the message fails to
send or ~azure.servicebus.common.errors.OperationTimeoutError if sending times out.
Expand All @@ -314,7 +313,6 @@ def send(self, message, timeout=None):
self._do_retryable_operation(
self._send,
message=message,
timeout=timeout,
require_timeout=True,
require_last_exception=True
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,12 @@ def from_connection_string(
)
return cls(**constructor_args)

async def send(self, message, timeout=None):
async def send(self, message):
# type: (Message, float) -> None
"""Sends message and blocks until acknowledgement is received or operation times out.

:param message: The ServiceBus message to be sent.
:type message: ~azure.servicebus.Message
:param float timeout: The maximum wait time to send the event data.
:rtype: None
:raises: ~azure.servicebus.common.errors.MessageSendFailed if the message fails to
send or ~azure.servicebus.common.errors.OperationTimeoutError if sending times out.
Expand All @@ -262,7 +261,6 @@ async def send(self, message, timeout=None):
await self._do_retryable_operation(
self._send,
message=message,
timeout=timeout,
require_timeout=True,
require_last_exception=True
)
Expand Down