Skip to content

Service bus websocket connection break after a minute or so #31067

Open
@hchandola

Description

@hchandola

I have the following code that gives errors on complete_message whenever the function one_minute_work takes a minute or so. The error I see in the logs is: Cannot write to closing transport

service_bus_client = ServiceBusClient.from_connection_string(
        SERVICE_BUS_CONNECTION_STRING,
        transport_type=TransportType.AmqpOverWebsocket,
    )


async with AutoLockRenewer(…) as renewer:
   receiver = service_bus_client.get_subscription(topic, subscription, mode=ServiceBusReceiveMode.PEEK_LOCK, 
auto_lock_renewer=auto_lock_renewer)
   async with receiver:
	async for message in receiver:
		await one_minute_work(message)
		await receiver.complete_message(message)

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.MessagingMessaging crewService Buscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions