Questions tagged «apache-kafka»

Apache Kafka是一个分布式流平台,旨在存储和处理高吞吐量数据流。

2
如果消息处理失败,则再次使用同一消息
我正在使用Confluent.Kafka .NET客户端版本1.3.0。我正在关注文档: var consumerConfig = new ConsumerConfig { BootstrapServers = "server1, server2", AutoOffsetReset = AutoOffsetReset.Earliest, EnableAutoCommit = true, EnableAutoOffsetStore = false, GroupId = this.groupId, SecurityProtocol = SecurityProtocol.SaslPlaintext, SaslMechanism = SaslMechanism.Plain, SaslUsername = this.kafkaUsername, SaslPassword = this.kafkaPassword, }; using (var consumer = new ConsumerBuilder<Ignore, string>(consumerConfig).Build()) { var cancellationToken = new CancellationTokenSource(); …

2
如何使用Faust Python软件包将kafka主题与Web端点连接?
我有一个简单的应用程序,具有两个功能,一个用于收听主题,另一个用于Web端点。我想创建服务器端事件流(SSE),即文本/事件流,以便在客户端可以使用EventSource收听它。 我现在有以下代码,其中每个功能都在执行其特定的工作: import faust from faust.web import Response app = faust.App("app1", broker="kafka://localhost:29092", value_serializer="raw") test_topic = app.topic("test") @app.agent(test_topic) async def test_topic_agent(stream): async for value in stream: print(f"test_topic_agent RECEIVED -- {value!r}") yield value @app.page("/") async def index(self, request): return self.text("yey") 现在,我要在索引中输入类似以下代码的内容,但是使用费力: import asyncio from aiohttp import web from aiohttp.web import Response from …

2
Kafka:持续获取FETCH_SESSION_ID_NOT_FOUND
我不断收到FETCH_SESSION_ID_NOT_FOUND。我不确定为什么会这样。任何人都可以在这里取悦我,这是什么问题,对消费者和经纪人的影响是什么。 Kafka服务器日志: INFO [2019-10-18 12:09:00,709] [ReplicaFetcherThread-1-8][] org.apache.kafka.clients.FetchSessionHandler - [ReplicaFetcher replicaId=6, leaderId=8, fetcherId=1] Node 8 was unable to process the fetch request with (sessionId=258818904, epoch=2233): FETCH_SESSION_ID_NOT_FOUND. INFO [2019-10-18 12:09:01,078] [ReplicaFetcherThread-44-10][] org.apache.kafka.clients.FetchSessionHandler - [ReplicaFetcher replicaId=6, leaderId=10, fetcherId=44] Node 10 was unable to process the fetch request with (sessionId=518415741, epoch=4416): FETCH_SESSION_ID_NOT_FOUND. INFO [2019-10-18 …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.