1

I am using debezium in my java application to capture changes from Oracle 12c. The oracle database is accessible on localhost:1521. Below is respective java code.

    // Define the configuration for the embedded and Oracle connector ...
    Configuration config = Configuration.create()
            .with("connector.class", "io.debezium.connector.oracle.OracleConnector")
            .with("tasks.max", "1")
            .with("offset.storage",
                    "org.apache.kafka.connect.storage.FileOffsetBackingStore")
            .with("offset.storage.file.filename",
                    "/home/username/oracleLogs/offset.dat")
            .with("offset.flush.interval.ms", 10000)
            .with("name", "oracle-debezium-connector")
            .with("database.hostname", "localhost")
            .with("database.port", "1521")
            .with("database.user", "c##xstrm")
            .with("database.password", "xs")
            .with("database.sid", "ORCLCDB")
            .with("database.server.name", "oracle-debezium-server")
            .with("database.out.server.name", "dbzxout")
            .with("database.history",
                    "io.debezium.relational.history.FileDatabaseHistory")
            .with("database.history.file.filename",
                    "/home/username/oracleLogs/dbhistory.dat")
            .with("database.dbname", "ORCLCDB")
            .with("database.pdb.name", "ORCLPDB1")
            .build();

    // Create the engine with this configuration ...
    EmbeddedEngine engine = EmbeddedEngine.create()
            .using(config)
            .notifying(this::handleEvent)
            .build();

    // Run the engine asynchronously ...
    ExecutorService executor = Executors.newSingleThreadExecutor();
    executor.execute(engine);

Note that the Oracle database is configured as given here. Also the ojdbc8.jar and xstreams.jar obtained from Oracle Instant Client have been imported to the java project.

When the above code is executed, it produces following output even when the Oracle database is shut-down. The changes are not captured either.

28 [pool-1-thread-1] INFO org.apache.kafka.connect.storage.FileOffsetBackingStore  - Starting FileOffsetBackingStore with file /home/username/oracleLogs/offset.dat

What am I doing here wrong?

  • 1
    Did you get the solution for this ? Also, Is it possible to share the sample complete code for this ?. Appreciate your help. – shiv Nov 21 '18 at 06:00
  • I didn't get a solution yet. But got some improvements. However [this](https://github.com/chathuranga95/Embedded-Debezium-CDC/blob/master/src/main/java/io/debezium/App.java) is my repo for the code. – chathuranga siriwardhana Nov 29 '18 at 10:19
  • Thank you for response. – shiv Nov 29 '18 at 15:20

0 Answers0