-
Notifications
You must be signed in to change notification settings - Fork 61
Description
We migrate from old azure servicebus sdk to the new one and we have a couple of of problems after the first deployment. Here's one of them:
We get several errors with the message:
...
Caused by: java.lang.IllegalStateException: Timeout on blocking read for 10400000000 NANOSECONDS
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:123)
at reactor.core.publisher.Mono.block(Mono.java:1766)
at com.azure.messaging.servicebus.ServiceBusSenderClient.sendMessage(ServiceBusSenderClient.java:266)
....
One timestamp: "@timestamp":"2025-01-06T15:01:40.831Z"
queue: tos_trace_queue
namespace: sbus-nonprod-sprint-main-pextnk
Sdk version: 7.17.7
Java version: 17
Here's the setup of the sender:
public ServiceBusSenderClient prepareSender(String queueName) {
return new ServiceBusClientBuilder()
.connectionString(....)
.retryOptions(RETRY_OPTIONS)
.sender()
.queueName(queueName)
.buildClient();
}
RETRY_OPTIONS are created using this code:
Long TIMEOUT = 2000L;
AmqpRetryOptions RETRY_OPTIONS=prepareRetryOptions();
ServiceBusSenderClient prepareSender(String entityName);
static AmqpRetryOptions prepareRetryOptions() {
AmqpRetryOptions retryOptions = new AmqpRetryOptions();
retryOptions.setMode(AmqpRetryMode.FIXED);
retryOptions.setTryTimeout(Duration.ofMillis(TIMEOUT));
return retryOptions;
}
Where from the 10400000000 NANOSECONDS timeout comes and how can we avoid it?
Thanks,
Cristi
C:lone: Azure/azure-sdk-for-java#44688