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

Send producer problem when the service broker is offline #106

Open
alfnunes opened this issue Nov 30, 2016 · 1 comment
Open

Send producer problem when the service broker is offline #106

alfnunes opened this issue Nov 30, 2016 · 1 comment

Comments

@alfnunes
Copy link

Hi, I'm facing a problem in case of the service broker is offline with the command

client.SendMessageAsync(topicName, new[] { new Message(message) }).Wait();

Are there anyay to see if the service broker is online before to send the message?

Thank you.

@aries-zhang
Copy link

I encountered the same problem. It seems the following timeout settings in KafkaOptions do not work.

var options = new KafkaOptions(uris) { MaximumReconnectionTimeout = TimeSpan.FromSeconds(2.5), ResponseTimeoutMs = TimeSpan.FromSeconds(15) };

If the broker is offline, the following line of code in line 107 KafkaConnection.cs hangs forever.

await _client.WriteAsync(request.Encode())

There should be a connection timeout option and if the broker is not accessible, exception should be thrown after waiting for a configured amount of time.

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

2 participants