[英]What is the best way to read data from Spanner to PubSub Queue?
I need something like a listener which listens to changes in the database.我需要像监听器这样的东西来监听数据库中的变化。 As soon as some change occurs, it inserts the updated row in the pubSub queue.
一旦发生一些变化,它就会在 pubSub 队列中插入更新的行。 What is the best way to do this?
做这个的最好方式是什么?
It's still in alpha stage, but you could have a look at this:https://github.com/cloudspannerecosystem/spanner-change-watcher它仍处于 alpha 阶段,但你可以看看这个:https://github.com/cloudspannerecosystem/spanner-change-watcher
It's a generic framework for watching a Spanner database for changes by polling tables for new commit timestamps.它是一个通用框架,用于通过轮询表中的新提交时间戳来观察 Spanner 数据库的更改。 It does require the tables that you want to watch for changes to contain a column with the option
ALLOW_COMMIT_TIMESTAMP=TRUE
and for this column to be filled.它确实需要您要监视更改的表包含一个带有选项
ALLOW_COMMIT_TIMESTAMP=TRUE
的列,并填充该列。
It contains three main modules:它包含三个主要模块:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.