You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Timeout when connecting to service](#timeout-when-connecting-to-service)
@@ -128,82 +127,6 @@ See the [Troubleshooting message handling issues](#troubleshooting-message-handl
128
127
129
128
See the [Troubleshooting message handling issues](#troubleshooting-message-handling-issues) to help troubleshoot AutoLockRenewer errors.
130
129
131
-
## Threading and concurrency issues
132
-
133
-
### Thread safety limitations
134
-
135
-
**Important:** We do not guarantee that the `ServiceBusClient`, `ServiceBusSender`, and `ServiceBusReceiver` are thread-safe or coroutine-safe. We do not recommend reusing these instances across threads or sharing them between coroutines.
136
-
137
-
The data model type, `ServiceBusMessageBatch` is not thread-safe or coroutine-safe. It should not be shared across threads nor used concurrently with client methods.
138
-
139
-
Using the same client instances across multiple threads or tasks without proper synchronization can lead to:
140
-
141
-
- Connection errors and unexpected exceptions
142
-
- Message corruption or loss
143
-
- Deadlocks and race conditions
144
-
- Unpredictable behavior
145
-
146
-
It is up to the running application to use these classes in a concurrency-safe manner.
147
-
148
-
For scenarios requiring concurrent sending in asyncio applications, ensure proper coroutine-safety management using mechanisms like asyncio.Lock().
149
-
150
-
```python
151
-
import asyncio
152
-
from azure.servicebus.aio import ServiceBusClient
153
-
from azure.servicebus import ServiceBusMessage
154
-
from azure.identity.aio import DefaultAzureCredential
0 commit comments