Processor / Messages Router
This is a simple Kafka Stream App (Java) that reads messages from Source topic and routes them (with no change) to a sink topic.
Input parameters are passed as env variables:
bootstrap.servers - list of brokers to bootstrap kafka connection
OSDU_STREAMS_SUBSCRIBEIDS - the list of message keys to monitor in the source topic and route to sink topic
OSDU_STREAMS_SOURCEBINDINGS - the list of source topics to read messages from
OSDU_STREAMS_SINKBINDINGS - the list of sink topics to write the messages to
-
On start-up extract the parameters from env variables: -
bootstrap.servers = localhost:9092 (list of brokers to bootstrap Kafka connection) -
OSDU_STREAMS_SUBSCRIBEIDS = "opendes:work-product-component--WellLog:be54a691c0384182944d71c6b2b6f699" -
OSDU_STREAMS_SOURCEBINDINGS = "opendes_wks_work-product-component--WellLog_1.0.0" -
OSDU_STREAMS_SINKBINDINGS = "opendes_myApp--WellLog_1.0.0"
-
-
establish connection with Kafka using bootstrap servers and topics information -
create the topology to route messages from source topic to sink topic with no changes -
create tests for the Kafka Streams App