[ad_1]
When using session-based entities for Azure Service Bus, what are the best practices for managing the receivers? I’m managing my non-session-based entities through pooling, similar to what is recommended here. Could session-based entities be pooled in the same way, perhaps together with the SessionId
?
Currently, I’m creating/disposing the receiver instance for every call, although the session is expected to receive multiple messages in close succession.
The receiver is instantiated as follows:
await using var receiver = await _serviceBusFactory.ServiceBusClient.AcceptSessionAsync(topicName, subscriptionName, sessionId);
[ad_2]