問題描述
我一直試圖找到在單個 Oracle 11g R2 實例中捕獲更改通知的最高效/最有效的方法,并將這些事件傳送到 Apache Kafka 隊列,但我找不到任何簡單的示例或教程沿著這些路線.
I've been trying to find the most efficient/effective way capture change notifications in a single Oracle 11g R2 instance and deliver those events to an Apache Kafka queue, but I haven't been able to find any simple examples or tutorials along these lines.
我在 Oracle 方面看到了一些可能性(Streams,更改數(shù)據(jù)捕獲、觸發(fā)器(糟糕)等等),但我仍然不確定哪個是最好的追求.
I've seen some possibilities on the Oracle side (Streams, Change Data Capture,triggers (yuck), etc..), but I'm still not sure which would be best to pursue.
這是一個在 GitHub 上使用 MySQL 和 Kafka 的項目,名為 mypipe,我只是沒有看到任何東西與 Oracle 類似.我不確定是否最好專注于為此編寫 Oracle 包,或者類似于 mypipe 項目等的層.
Here is a project utilizing MySQL and Kafka on GitHub called mypipe, I just haven't seen anything similar for Oracle. I'm not sure if it would be best to focus writing an Oracle package for this, or a layer similar to the mypipe project, etc. etc..
任何建議、建議或示例將不勝感激.謝謝.
Any recommendations, suggestions or examples would be greatly appreciated. Thank you.
推薦答案
目前只有一種工具是開源的,對數(shù)據(jù)庫的影響很小.這是OpenLogReplicator.
There is currently just one tool which is open source and has minimal impact on the database. This is OpenLogReplicator.
許可證是 GPL - 它是完全開源的
license is GPL - it is fully open source
它對源數(shù)據(jù)庫的影響非常小 - 它不需要許可選項,只需打開源上的補充日志記錄(就像所有其他復制工具一樣)
it has very low impact on the source database - it requires no licensing options and just turning on supplemental logging on the source (like all other replication tools)
它完全用 C++ 編寫 - 因此它具有非常低的延遲和高吞吐量
it is written completely in C++ - so it has very low latency and high throughput
它完全在內存中工作
它支持自 11.2.0.1(11.2、12.1、12.2、18、19)以來的所有 Oracle 數(shù)據(jù)庫版本
it supports all Oracle database versions since 11.2.0.1 (11.2, 12.1, 12.2, 18, 19)
它讀取二進制格式的 Oracle Redo 日志并將它們發(fā)送到 Kafka.它可以在數(shù)據(jù)庫主機上工作,但您也可以將其配置為使用 sshfs 從另一臺主機讀取重做日志 - 以最小的數(shù)據(jù)庫負載.
It reads binary format of Oracle Redo logs and sends them to Kafka. It can work on the database host, but you can also configure it to read the redo logs using sshfs from another host - with minimal load of the database.
免責聲明 #1:我是此解決方案的作者
disclaimer #1: I am the author of this solution
免責聲明 #2:致其他 StackOverflow 用戶:請不要刪除此答案.這個問題有很多重復.但這是第一個問題,其他重復項應重定向到此處并標記為重復項.不是相反.我已從其他問題中刪除了所有其他答案,僅將此答案作為主要答案.
disclaimer #2: to other StackOverflow users: please do not delete this answer. This question has a lot of duplicates. But this is the first question and other duplicates should be redirected here and marked as duplicates. Not the other way. I have deleted all other answers from other questions and just leaving this answer as the primary answer.
這篇關于如何集成 Oracle 和 Kafka的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!