Demonstration Script¶
Goal¶
The goal of the demonstration is to send two messages to illustrate client creation and update message in this order. Then each message is enriched and routed to different topics.
The sequence of business operations:
- Bob TheBuilder is a new client so a web app is creating the record via a POST operation to the client management simulator
- The client record is updated by adding a beneficiary as spouce
- Then email address is changed.
We can do two type of environment:
Local execution demonstration¶
-
Pre-requisites
- You have docker desktop or a compatible product installed on your laptop.
-
Under the project top folder starts docker compose:
-
Verify the existing topics are empty, using the open source tool called Kafdrop:
-
When the simulator starts, it sends the categories as reference data to the
lf-category
topic, which you can verify in Kafdrop -
Configure Kafka MQ Source connector so data sent by the Simulator to MQ are moved to Kafka
Result should look like:lf-raw-tx
topic: -
To access the MQ Console use the following URL
You shoud reach a login page (admin/passw0rd) and then the Home page
-
Send a new client creation command: which does a HTTP POST to the simulator URL
/api/v1/clients
. -
Verify the data is now in the
lf-raw-tx
-
The Stream processing has routed the transaction to the
lf-tx-a
topic -
Create a second transaction with one error (the category id is wrong), the message is routed to the dead letter queue
-
Modify the client with a business category
-
All the transactions are kept in order to reprocess if needed:
-
Stop your environment
OpenShift Deployment demonstration¶
-
Pre-requisites
- You have te
make
tool
- You have te
-
Deploy the solution with one commmand
See more detail in this section
-
Verify your environments
- Verify MQ source connector is ready
oc get kafkaconnectors # Output> # NAME CLUSTER CONNECTOR CLASS MAX TASKS READY # mq-source eda-kconnect-cluster com.ibm.eventstreams.connect.mqsource.MQSourceConnector 1 True
- Deeper view of the connector
-
Access the Simulator App
-
Access the Simulator APIs by clicking on q/swagger-ui link from the home page:
-
Use the POST on
/api/v1/clients
to send a client creation command with the following data:"id": "101012", "code": "C02", "insuredPerson": { "id": 2, "code": "P02", "first_name": "julie", "last_name": "thesimmer", "address": "10 market street, CA, San Franciso", "phone": "650-650-650", "mobile": "", "email": "jswimmer@email.com" }, "client_category_id": 1
The request:
The response with a populated id:
-
Verify the message reaches the Kafka topic named
lf-raw-tx