-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Message gets produced twice after restart #215
Comments
How can you close your application ? Properly with |
I do both. using Streamiz.Kafka.Net;
namespace Test.Streams;
public class Streamer : BackgroundService
{
private KafkaStream? _kafkaStream;
private readonly TopologyBuilder _TopologyBuilder;
private readonly StreamConfigBuilder _StreamConfigBuilder;
public Streamer(TopologyBuilder TopologyBuilder, StreamConfigBuilder StreamConfigBuilder)
{
_TopologyBuilder = TopologyBuilder;
_StreamConfigBuilder = StreamConfigBuilder;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
var topology = _TopologyBuilder.Build();
var config = _StreamConfigBuilder.Build();
_kafkaStream = new KafkaStream(topology, config);
await _kafkaStream.StartAsync(stoppingToken);
}
public override void Dispose()
{
_kafkaStream?.Dispose();
base.Dispose();
}
} |
@lukasswm |
here is the log. I removed the message payloads and some other information. But I hope it is still fine.
|
Indeed, it seems this record Do you removed the topic value-topic and recreate with the same name in a short time ? Can you consume the topic with the CLI like : kafka-console-consumer --bootstrap-server localhost:9095 --topic value-topic --property print.key=true --from-beginning And put the results |
Description
Referencing the same set up as in #212
Starting the application when there are already messages on a topic will produce the messages twice in the restart process.
Issue does not occur every time. feels like a raice condition. but when it occurs it will produce every message twice. At least I tested it with 3 Messages and all of them got duplicated.
How to reproduce
The text was updated successfully, but these errors were encountered: