Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change shortening of TEQ to TxEventQ WSM 8022 #50

Merged
merged 7 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Introduction

This laboratory helps you know how to build an Event-driven architecture based on Spring Boot microservices that “communicate” asynchronously using Apache Kafka. The laboratory have two microservices, a producer and a consumer, built using Spring Boot framework that connect with an Apache Kafka broker to exchange events.
This lab helps you know how to build an Event-driven architecture based on Spring Boot microservices that “communicate” asynchronously using Apache Kafka. The lab have two microservices, a producer and a consumer, built using Spring Boot framework that connect with an Apache Kafka broker to exchange events.

Estimated Time: 10 minutes

Expand Down Expand Up @@ -58,7 +58,7 @@ Watch the video below for a quick walk-through of the lab.
⠿ Container broker Started 1.7s
⠿ Container schema-registry Started 3.1s
⠿ Container connect Started 4.4s
Connecting Kafka broker on network teqod_net
Connecting Kafka broker on network txeventqlab_net
KAFKA_RUNNING completed
```

Expand Down Expand Up @@ -91,21 +91,21 @@ Watch the video below for a quick walk-through of the lab.

```bash
<copy>
kafka-add-topic LABTEQTOPIC1
kafka-add-topic TXEVENTQTOPIC1
</copy>
```

This command will create the Kafka Topic and configure the properties of the Producer and Consumer microservices to point to the newly created topic.

```bash
Created topic LABTEQTOPIC1
Configuring Kafka Producer to produce on topic LABTEQTOPIC1.
Configuring Kafka Consumer to consume from topic LABTEQTOPIC1.
Created topic TXEVENTQTOPIC1
Configuring Kafka Producer to produce on topic TXEVENTQTOPIC1.
Configuring Kafka Consumer to consume from topic TXEVENTQTOPIC1.
```

## **Task 2:** Build Kafka producer and consumer microservices

This laboratory adopted the microservices architecture and coded the producer and consumer using the Spring Boot framework and Spring Kafka project to connect with Kafka. Maven is the dependency management tool, and to build our code, you have to execute the following commands:
This lab adopted the microservices architecture and coded the producer and consumer using the Spring Boot framework and Spring Kafka project to connect with Kafka. Maven is the dependency management tool, and to build our code, you have to execute the following commands:

```bash
<copy>
Expand Down Expand Up @@ -167,7 +167,7 @@ As a result of the Maven build task, you should obtain the following lines showi

```bash
<copy>
curl -X POST -H "Content-Type: application/json" \
curl -s -X POST -H "Content-Type: application/json" \
-d '{ "id": "id1", "message": "message1" }' \
http://localhost:8080/placeMessage | jq
</copy>
Expand All @@ -186,7 +186,7 @@ As a result of the Maven build task, you should obtain the following lines showi

```bash
<copy>
kafka-dequeue LABTEQTOPIC1
kafka-dequeue TXEVENTQTOPIC1
</copy>
```

Expand Down Expand Up @@ -246,7 +246,7 @@ Now that we have Producer running and publishing events inside the Kafka Broker,

![Spring Boot Kafka Consumer Running Logs](images/springboot-kafka-consumer-test.png " ")

Look for `message {"id": "0", "message": "message1"}`. With this result, assuming a successful result, we could produce and consume events from Kafka Broker.
Look for the message `{"id": "0", "message": "message1"}`. With this result, assuming a successful result, we can then produce and consume Kafka Broker events.

## **Task 5:** Restart Kafka Components (optional)

Expand Down Expand Up @@ -289,4 +289,4 @@ You may now **proceed to the next lab**

- **Authors** - Andy Tael, Developer Evangelist; Paulo Simoes, Developer Evangelist; Paul Parkinson, Developer Evangelist; Richard Exley, Consulting Member of Technical Staff, Oracle MAA and Exadata
- **Contributors** - Mayank Tayal, Developer Evangelist; Corrado De Bari, Developer Evangelist; Sanjay Goil, VP Microservices and Oracle Database
- **Last Updated By/Date** - Andy Tael, Sep 2022
- **Last Updated By/Date** - Paulo Simoes, Oct 2022

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## About this Workshop

This workshop will help you understand Event Mesh using two message brokers and the technical capabilities inside the converged Oracle Database to support a scalable event-driven microservices architecture.
This workshop will help you understand Event Mesh using two message brokers and the technical capabilities inside the converged Oracle Database to support a scalable event-driven microservices architecture. "You will learn how to Kafka is similar to TxEventQ and how easy it is to convert an Apache Kafka Java microservice application to run with Oracle TxEventQ emulating a Kafka Broker."

You will create four event-driven microservice and two messaging brokers to allow communication between them. In the first lab, you will deploy an Apache Kafka broker to leverage the event-driven communication between two microservices written in Spring Boot. In the second lab, you will create an Oracle Transactional Event Queues (TEQ) and experience the Kafka APIs working in the Kafka compatibility mode. Likewise, this module has the Spring Boot producer and consumer microservices but with Kafka Java client for TEQ, using the okafka library. And finally, in the third lab, you will experiment with the concept of Event Mesh, building a bridge between Kafka and TEQ brokers, and see messages being produced on the Kafka side and consumed on the TEQ side.
You will create four event-driven microservices and two messaging brokers to allow communication between them. In the first lab, you will deploy an Apache Kafka broker to leverage the event-driven communication between two microservices written in Spring Boot. In the second lab, you will create an Oracle Transactional Event Queues (TxEventQ) and experience the Kafka APIs working in the Kafka compatibility mode. Likewise, this module has the Spring Boot producer and consumer microservices but with Kafka Java client for TxEventQ, using the okafka library. And finally, in the third lab, you will experiment with the concept of Event Mesh, building a bridge between Kafka and TxEventQ brokers, and see messages being produced on the Kafka side and consumed on the TxEventQ side.

Estimated Workshop Time: 50 minutes

Expand All @@ -20,11 +20,11 @@ Estimated Workshop Time: 50 minutes

### Objectives

* The first Lab reviews the Kafka and Spring Boot Microservice built to produce and consume messages.
* The second Lab reviews the Kafka and Spring Boot Microservice built to produce and consume messages.

* The second Lab will use Oracle Transactional Event Queues (TEQ) and okafka library and demonstrate the Kafka compatibility of TEQ. Also, this module has the same Spring Boot producer and consumer microservices but uses okafka in place of Kafka libraries and TEQ in the database in place of Kafka broker.
* The third Lab will use Oracle Transactional Event Queues (TxEventQ) and okafka library and demonstrate the Kafka compatibility of TxEventQ. Also, this module has the same Spring Boot producer and consumer microservices but uses okafka in place of Kafka libraries and TxEventQ in the database in place of Kafka broker.

* The third Lab will interconnect the Kafka broker and the Oracle Transactional Event Queues (TEQ), applying Kafka connector and Oracle Database Messaging libraries. This laboratory demonstrates the interoperability between the two brokers, with events flowing from the Kafka side to TEQ, finally consumed at the TEQ side.
* The fourth Lab will interconnect the Kafka broker and the Oracle Transactional Event Queues (TxEventQ), applying Kafka connector and Oracle Database Messaging libraries. This lab demonstrates the interoperability between the two brokers, with events flowing from the Kafka side to TxEventQ, consumed at the TxEventQ side.

### Prerequisites

Expand All @@ -35,15 +35,13 @@ Estimated Workshop Time: 50 minutes

## Event Mesh Architecture Overview

As shown in the followed diagram, we have:
As shown in the following diagram, we have:

* A Kafka Broker and a set of services consuming and producing for it.
* A Kafka Broker and a set of microservices consuming and producing messages on Kafka Topics.
* An Oracle TxEventQ Broker with another set of microservices consuming and producing messages on TxEventQ Queues.
* A connector between Kafka and Oracle TxEventQ enabling messages to flow from Kafka Topic to TxEventQ Queue

* An Oracle TEQ Broker with another set of services around it.

* And connector between Kafka and Oracle TEQ enabling a communication path between them.

![Kafka and Oracle TEQ Event Mesh](images/kafka-oracle-teq-event-mesh.png " ")
![Kafka and Oracle TxEventQ Event Mesh](images/eventmesh-txeventq-kafka.drawio.png " ")

You may now **proceed to the next lab**

Expand All @@ -58,4 +56,4 @@ You may now **proceed to the next lab**

* **Authors** - Paulo Simoes, Developer Evangelist; Andy Tael, Developer Evangelist; Paul Parkinson, Developer Evangelist; Richard Exley, Consulting Member of Technical Staff, Oracle MAA and Exadata
* **Contributors** - Mayank Tayal, Developer Evangelist; Corrado De Bari, Developer Evangelist; Sanjay Goil, VP Microservices and Oracle Database
* **Last Updated By/Date** - Andy Tael, Aug 2022
* **Last Updated By/Date** - Andy Tael, Oct 2022
Loading