This document describes core scenarios for the Python 7.0 (Track 2) Service Bus SDK. The APIView can be found here
(Credit goes to Connie for giving a great skeleton to hack this off of)
Current API for long running polling operations is as follows:
def status(self):
# type: () -> Any
...
def result(self, timeout=None):
# type: (Optional[int]) -> Model
...Track 1 SDK used a sample, rather than an API to support this scenario:
async def message_processing(queue_client):
while True:
try:
async with queue_client.get_receiver(session=NEXT_AVAILABLE, idle_timeout=1) as session:
await session.set_session_state("OPEN")
async for message in session:
print("Message: {}".format(message))