我使用postgres配置了debezium,如下代码所示,当我启动我的spring引导应用程序时,a get an error Creation of replication slot failed @Bean
public io.debezium.config.Configuration connector() {
return io.debezium.config.Configuration.create()
.with(EmbeddedEngine.CONNECTOR_CLASS, PostgresConnector.class)
使用debezium从Postgres中更改流
已完成的设置:
码头设置。
启动Postgres,动物园管理员,kafka,然后去贝兹姆连接器。
远程数据库设置与解码,wal2json(postgres)。
用卷曲连接到去贝兹姆。
创造了一个观察者。
问题:当我开始观察时,它正在读取前面发生的所有更改,但是当插入完成时,卡夫卡向debezium抛出一个异常,上面写着"An exception occurred in the change event producer. This connector will be stoppe
在连接器post请求创建过程中,我收到以下错误:
Error message : 500 Internal Server Error,
error response: {"error_code":500,"message":"org.apache.kafka.connect.runtime.distributed.RebalanceNeededException: Request cannot be completed because a rebalance is expected"}
Requst body:
{"name"
我的应用程序中的Kafka debezium-postgres连接器抛出了以下错误:
org.apache.kafka.connect.errors.ConnectException: Unable to obtain valid replication slot. Make sure there are no long-running transactions running in parallel as they may hinder the allocation of the replication slot when starting this connector
at io.
我在postgres中使用了以下SQL查询:
SELECT
date_trunc('month', s.thedate),
r.rank,
COUNT(r.rank)
FROM
serps s
LEFT JOIN ranks r ON r.serpid = s.serpid
GROUP BY
date_trunc('month', s.thedate), s.thedate, r.rank
ORDER BY
s.thedate ASC;
当我直接对数据库运行该查询时,我会得到所需的所有数据,并且日期似乎是正确的
我希望在不被jdbc驱动程序转换为本地时区的情况下将时间戳保存到数据库中。目前,只有MySQL和PostgreSQL对我来说很重要,但如果有独立于数据库的解决方案,我将不胜感激。
示例:
// i want that to be saved as 1970-01-01 00:00:00
TimeStamp ts = new java.sql.Timestamp(0);
// gets transformed to local time by jdbc driver (in my case to 1970-01-01 01:00:00)
st.setTimestamp(0, new java.