Debezium 心跳动作未触发 [英] Debezium Heartbeat Action not firing

查看:54
本文介绍了Debezium 心跳动作未触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 Debezium 和 Postgres 时,我们发现心跳似乎不起作用.我们在目标数据库中创建了一个虚拟表来执行心跳操作,但我们从未看到该表中的数据发生任何变化.

When working with Debezium and Postgres, we're seeing an issue where the heartbeat doesn't seem to be working. We have created a dummy table in the target database for performing the heartbeat actions on, but we don't ever see any change to the data in that table.

我们启用了心跳,因为我们看到了它旨在解决的相同行为,即 https://issues.redhat.com/browse/DBZ-1815.

We've enabled the heartbeat, as we're seeing the same behavior that it was designed to address, namely https://issues.redhat.com/browse/DBZ-1815.

我们使用的是 Postgres 12 和 Debezium 1.3(或 1.5,两者都进行了试验)

We're using Postgres 12, and Debezium 1.3 (or 1.5, have experimented with both)

配置是

{
  "name": "my-service-outbox",  
  "config": {
    "connector.class": "io.debezium.connector.postgresql.PostgresConnector", 
    "plugin.name":"pgoutput",
    
    "database.hostname": "dbhostname", 
    "database.port": "5432", 
    "database.user": "user", 
    "database.password": "password", 
    "database.dbname" : "dbname", 
    "database.server.name": "dbservername", 
    
    "table.include.list": "public.outbox",
    "publication.autocreate.mode" : "filtered",
    "snapshot.mode":"exported",

    "heartbeat.interval.ms": 1000,
    "heartbeat.action​.query" :"INSERT INTO public.heartbeat (id, ts) VALUES (1, NOW()) ON CONFLICT(id) DO UPDATE SET ts=EXCLUDED.ts;"
  }
}

相关,但没有解决方案:https://stackoverflow.com/a/60808620/97879

Related, but no solution: https://stackoverflow.com/a/60808620/97879

感觉好像我们错过了一些启用心跳的东西,但除了确保设置了间隔之外什么也没看到.

It feels like we've missed something to enable the heartbeat, but not seeing anything besides ensuring the interval is set.

心跳正在工作,因为我们可以在心跳主题中看到消息.但是没有执行数据库操作.

The heartbeat is working, as we can see messages in the heartbeat topic. But the database action is not being performed.

有什么建议吗?

推荐答案

文档中有一个零宽度空格,因此如果您复制它,字符串将包含它,这意味着它不是 Debezium 期望的选项名称.

there is a zero-width space in the documentation so if you copied it the string contains it and it means it is not the option name expected by Debezium.

这篇关于Debezium 心跳动作未触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆