-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Reconnection loop after server PersistenceError #284
Comments
@adrianotr It seems like the exception is missing, so it's not clear what goes wrong, can you please check why exception is not logged? Here is the logging line This is the recommended logging setup (change Warning level to Debug): pulsar-client-dotnet/tests/IntegrationTests/Common.fs Lines 36 to 50 in 18c68d4
|
Here are the debug level logs:
|
I think the issue might be related to this one. Seems to be an issue with the KeyBased batching. I disabled batching and the error went away, however the producer throughput was affected pretty hard as expected. |
@adrianotr You still have to fix logging to see the error. For example in the previous issue there was the same error text, but because exception was logged it was easy to detect the problem. BTW, are you using the latest 3.6.1 ? |
I'm sorry, I forgot to include the exception from the logging tool I use. Also, I was on
|
You can use this to reproduce the issue: PulsarClient.Logger = LoggerFactory.Create(b => b
.AddConsole()
.SetMinimumLevel(LogLevel.Debug))
.CreateLogger("Pulsar.Client");
var client = await new PulsarClientBuilder()
.ServiceUrl("pulsar://localhost:6650")
.BuildAsync();
var producer = await client.NewProducer()
.Topic("public/test-namespace-with-deduplication-enabled/test-topic")
.EnableBatching(true)
.BatchBuilder(BatchBuilder.KeyBased)
.CreateAsync();
await Task.WhenAll(Enumerable.Range(0, 100).Select(async i =>
{
var randomKey = (byte)(i % 2);
var message = producer.NewMessage([0])
.WithOrderingKey(new byte[] { randomKey });
await Task.Delay(Random.Shared.Next(0, 5));
await producer.SendAsync(message);
})); You need to create that namespace and enable deduplication as well: $ pulsar-admin namespaces create public/test-namespace-with-deduplication-enabled
$ pulsar-admin namespaces set-deduplication public/test-namespace-with-deduplication-enabled --enable |
@adrianotr Can you please double check you are using 3.6.1, since I can't reproduce the error on that version (while I can on previous) |
Yes I'm sure. If I add this to my program var assembly = Assembly.Load("Pulsar.Client");
Console.WriteLine(assembly.GetName().Version); It prints out |
I can't reproduce the error with this example in 3.6.1. You can add a PR with failing integration test to the integration test suite, so it will be possible to fix |
@adrianotr I've just published 3.6.2. version with all tags specified, so you should no longer see exception with empty tag like |
Hello there! I think I might have found an issue.
The client connection seems to enter a loop trying to reconnect after we receive a PersistenceError from the server, as seen in the first line of the log.
Logs:
and the reconnection attempts continue.
Eventually the producer times out.
The text was updated successfully, but these errors were encountered: