Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Timeout on blocking read' when sending messages #435

Open
cristibozga opened this issue Dec 27, 2024 · 0 comments
Open

'Timeout on blocking read' when sending messages #435

cristibozga opened this issue Dec 27, 2024 · 0 comments

Comments

@cristibozga
Copy link

cristibozga commented Dec 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant