Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
主题未看到Mongodb Kafka消息_Mongodb_Apache Kafka_Apache Kafka Connect_Mongodb Kafka Connector - Fatal编程技术网

主题未看到Mongodb Kafka消息

主题未看到Mongodb Kafka消息,mongodb,apache-kafka,apache-kafka-connect,mongodb-kafka-connector,Mongodb,Apache Kafka,Apache Kafka Connect,Mongodb Kafka Connector,我发现我的主题尽管在运行和操作,但并没有注册MongoDB中发生的事件 每次插入/修改记录时,我不再从kafka控制台使用者命令获取日志 有没有办法清除卡夫卡的缓存/偏移? 源和接收器连接已启动并正在运行。整个集群也是健康的,事情是一切正常,但每隔几周我就会看到这种情况出现,或者当我从其他位置登录到我的Mongo云时 --分区0参数没有帮助,将保留时间也更改为1 我检查了两个连接器的状态并运行了: curl localhost:8083/connectors|jq curl localho

我发现我的主题尽管在运行和操作,但并没有注册MongoDB中发生的事件

每次插入/修改记录时,我不再从
kafka控制台使用者
命令获取日志

有没有办法清除卡夫卡的缓存/偏移? 源和接收器连接已启动并正在运行。整个集群也是健康的,事情是一切正常,但每隔几周我就会看到这种情况出现,或者当我从其他位置登录到我的Mongo云时

--分区0
参数没有帮助,将
保留时间
也更改为
1

我检查了两个连接器的状态并运行了

curl localhost:8083/connectors|jq

curl localhost:8083/connectors/monit|u people/status | jq

运行
docker compose logs connect
我发现:

    WARN Failed to resume change stream: Resume of change stream was not possible, as the resume point may no longer be in the oplog. 286

If the resume token is no longer available then there is the potential for data loss.
Saved resume tokens are managed by Kafka and stored with the offset data.
 
When running Connect in standalone mode offsets are configured using the:
`offset.storage.file.filename` configuration.
When running Connect in distributed mode the offsets are stored in a topic.

Use the `kafka-consumer-groups.sh` tool with the `--reset-offsets` flag to reset offsets.

Resetting the offset will allow for the connector to be resume from the latest resume token. 
Using `copy.existing=true` ensures that all data will be outputted by the connector but it will duplicate existing data.
Future releases will support a configurable `errors.tolerance` level for the source connector and make use of the `postBatchResumeToken

这个问题需要对Confluent Platform进行更多的实践,因此目前我通过使用以下方法移除整个容器来重建整个环境:

docker系统prune-a-f--volumes

docker container stop$(docker container ls-a-q-f“label=io.confluent.docker”)


运行
docker compose up-d后
一切正常。

您是否从一开始就缺少
?否则,您只能阅读新消息。您如何检查连接器的运行状况?这里的启动/正常运行只是验证连接http服务器是否已启动,没有任何一个连接器在工作。我从一开始就没有使用
——在过去也曾使用过。我运行了
curl localhost:8083/connectors | jq
curl localhost:8083/connectors/monit_people/status | jq
并且状态为
RUNNING
您正在使用哪个mongo连接器?您的docker图像是否在“每两周”这段时间内的任何时候停止?如果是这样,并且您没有使用卷装载,那么是-Docker正在删除Kafka数据您还可以在
Docker compose logs connect
Connectors:
https://www.confluent.io/hub/mongodb/kafka-connect-mongodb
https://www.confluent.io/hub/snowflakeinc/snowflake-kafka-connector
。当我完成学习后,我简单地用
docker container stop$(docker container ls-a-q-f“label=io.confluent.docker”)将docker imagie放下。