-
Notifications
You must be signed in to change notification settings - Fork 61
Description
We are migration from the old servicebus sdk to the new one and after the first deployment we had several errors.
One of them is:
{"@timestamp":"2025-01-01T04:34:28.321Z","@Version":"1","message":"{"az.sdk.message":"Error occurred while refreshing token that is not retriable. Not scheduling refresh task. Use ActiveClientTokenManager.authorize() to schedule task again.","exception":"Cannot send a message when request response channel is disposed. ConnectionId:MF_69a7a4_1735638516319 isCacheTerminated:false isConnectionTerminated:true","scopes":"amqp://sbus-nonprod-sprint-main-pextnk.servicebus.windows.net/slot_to_events_subscription_queue","audience":"amqp://sbus-nonprod-sprint-main-pextnk.servicebus.windows.net/slot_to_events_subscription_queue"}","logger_name":"com.azure.core.amqp.implementation.ActiveClientTokenManager","thread_name":"parallel-1","level":"ERROR","level_value":40000}
We use the following code to setup the sender:
public ServiceBusSenderClient prepareSender(String queueName) {
return new ServiceBusClientBuilder()
.connectionString(....)
.retryOptions(RETRY_OPTIONS)
.sender()
.queueName(queueName)
.buildClient();
}
SDK version 7.17.7
java version: 17
Can you, please, tell us why the error occurs and how can we avoid it?
Thanks,
Cristi