Skip to content

Commit 53349f7

Browse files
authored
Kieran's update on the API proposal
add session_id onto message, and autorenewer class.
2 parents 785bea9 + 30c37b5 commit 53349f7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

sdk/servicebus/azure-servicebus/api_review.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,15 @@ def expired(self) -> bool:
136136

137137

138138
class Message:
139-
def __init__(self, body : str, encoding : str = 'UTF-8', **kwargs) -> None:
139+
def __init__(self, body : str, encoding : str = 'UTF-8', session_id : str = None, **kwargs) -> None:
140140
def __str__(self):
141141

142142
# @properties
143143
def body(self) -> Union[bytes, Generator[bytes]]: # read-only
144144
def partition_key(self, value : str):
145145
def partition_key(self) -> str:
146+
def session_id(self, value : str):
147+
def session_id(self) -> str:
146148
def via_partition_key(self, value: str):
147149
def via_partition_key(self) -> str:
148150
def time_to_live(self, value : Union[float, timedelta]):
@@ -204,3 +206,10 @@ class TransportType(Enum):
204206
class ServiceBusSharedKeyCredential:
205207
def __init__(self, policy, key):
206208
def get_token(self, *scopes, **kwargs):
209+
210+
211+
class AutoLockRenew:
212+
def __init__(self, executor=None, max_workers=None):
213+
def __enter__(self):
214+
def __exit__(self, *args):
215+
def register(self, renewable, timeout=300):

0 commit comments

Comments
 (0)