Closed bbhxwl closed 8 months ago
Why can Java be used? C # consumption information keeps getting stuck and won't take the next step?
var config = new ConsumerConfig { BootstrapServers = "********:9092", GroupId = "kmerxpehg6vf2zvbtm", EnableAutoCommit = false, AutoCommitIntervalMs = 1000, MaxPollIntervalMs = 360000, SessionTimeoutMs = 150000, SaslMechanism = SaslMechanism.Plain, SecurityProtocol = SecurityProtocol.SaslPlaintext, SaslUsername = "openlksn92D", SaslPassword = "in9Jws23x52o=n", AutoOffsetReset = AutoOffsetReset.Earliest, EnableAutoOffsetStore = false, StatisticsIntervalMs = 5000, EnablePartitionEof = true, }; var consumer = new ConsumerBuilder<Ignore, string>(config) .Build(); consumer.Subscribe("kmerxpehg6vf2zvbtm"); var consumeResult = consumer.Consume();
You can go through https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/examples/Consumer/Program.cs for using consumer.
Why can Java be used? C # consumption information keeps getting stuck and won't take the next step?