Infrastructure setup

Oracle Event Hub Cloud (Kafka broker)

The Kafka cluster topology used for the sample application in the blog was relatively simple i.e. a single broker with co-located with Zookeeper).

Please refer to the documentation for further details on topology and the detailed installation process (hint: its straightforward!)

Create topic — create the topic (detailed documentation)

Creating custom access rule

You would need to create a custom Access Rule to open port 6667 on the Kafka Server VM on Oracle Event Hub Cloud — details here. This is just a temporary change to help with testing using the Kafka CLI

Oracle Application Container Cloud does not need port 6667 (Kafka broker) to be opened since the secure connectivity is taken care of by the service binding

Oracle MySQL Cloud

Provision a MySQL database instance — you can refer to the detailed documentation here

Oracle MySQL Cloud service instance

Create custom access rule

You would need to create a custom Access Rule to open port 3306 on the VM on Oracle MySQL Cloud — details here. This is just a temporary change to help with testing

Oracle Application Container Cloud does not need port 3306 (for MySQL service) to be opened since the secure connectivity is taken care of by the service binding

Create database table

Connect to the MySQL instance on Oracle Cloud and bootstrap the database table

CREATE TABLE `datadump` (

`uid` INT(10) NOT NULL AUTO_INCREMENT,

`topic` VARCHAR(64) NULL DEFAULT NULL,

`partition` INT(64) NULL DEFAULT NULL,

`offset` INT(64) NULL DEFAULT NULL,

`key` VARCHAR(64) NULL DEFAULT NULL,

`value` VARCHAR(64) NULL DEFAULT NULL,

`processedby` VARCHAR(64) NULL DEFAULT NULL,

`createdat` VARCHAR(64) NULL DEFAULT NULL,

PRIMARY KEY (`uid`)

);

We have the foundation — its time to deploy our application to the cloud and test it out