Skip to content

Commit 6493482

Browse files
TxEventQ Chapters (#992)
Signed-off-by: Anders Swanson <anders.swanson@oracle.com>
1 parent c72e16f commit 6493482

File tree

7 files changed

+140
-4
lines changed

7 files changed

+140
-4
lines changed

docs-source/cloudbank/content/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To complete the modules you will somewhere to run Oracle Backend for Microservic
2222

2323
Regardless of which option you choose, the remainder of the modules will be virtually identical.
2424

25-
You will need a Java SDK and either Maven or Gradle to build your applicaitons. An IDE is not strictly required,
25+
You will need a Java SDK and either Maven or Gradle to build your applications. An IDE is not strictly required,
2626
but you will have a better overall experience if you use one. We recommend Visual Studio Code or IntelliJ.
2727

2828
### Modules

docs-source/transactional-event-queues/content/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ archetype = "home"
33
title = "Transactional Event Queues"
44
+++
55

6-
[Oracle Transactional Event Queues (TxEventQ)]() is a messaging platform built into Oracle Database that combines the best features of messaging and pub/sub systems. TxEventQ was introduced as a rebranding of AQ Sharded Queues in Oracle Database 21c, evolving from the Advanced Queuing (AQ) technology that has been part of Oracle Database since version 8.0. TxEventQ continues to evolve in Oracle Database 23ai, with [Kafka Java APIs](https://github.com/oracle/okafka), Oracle REST Data Services (ORDS) integration, and many more features and integrations.
6+
[Oracle Transactional Event Queues (TxEventQ)](https://www.oracle.com/database/advanced-queuing/) is a messaging platform built into Oracle Database that combines the best features of messaging and pub/sub systems. TxEventQ was introduced as a rebranding of AQ Sharded Queues in Oracle Database 21c, evolving from the Advanced Queuing (AQ) technology that has been part of Oracle Database since version 8.0. TxEventQ continues to evolve in Oracle Database 23ai, with [Kafka Java APIs](https://github.com/oracle/okafka), Oracle REST Data Services (ORDS) integration, and many more features and integrations.
77

88
TxEventQ is designed for high-throughput, reliable messaging in event-driven microservices and workflow applications. It supports multiple publishers and consumers, exactly-once delivery, and robust event streaming capabilities. On an 8-node Oracle Real Application Clusters (RAC) database, TxEventQ can handle approximately 1 million messages per second, demonstrating its scalability.
99

@@ -25,7 +25,7 @@ Key features of Oracle Database Transactional Event Queues include:
2525

2626
4. Retention of messages for a specified time after consumption by subscribers.
2727

28-
5. Capability to query of message queues and their metadata by standard SQL.
28+
5. Capability to query message queues and their metadata by standard SQL.
2929

3030
6. Transactional outbox support: This simplifies event-driven application development for microservices.
3131

@@ -36,4 +36,4 @@ Oracle Database Transactional Event Queues are free to use with Oracle Database
3636
Citations:
3737
1. [Oracle Database Transactional Event Queues homepage](https://www.oracle.com/database/advanced-queuing/)
3838
2. [Transactional Event Queue Documentation for Oracle Database 23ai](https://docs.oracle.com/en/database/oracle/oracle-database/23/adque/aq-introduction.html)
39-
2. [Kafka Java Client for Oracle Database Transactional Event Queues](https://github.com/oracle/okafka)
39+
3. [Kafka Java Client for Oracle Database Transactional Event Queues](https://github.com/oracle/okafka)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
+++
2+
archetype = "chapter"
3+
title = "Migrating From AQ"
4+
weight = 5
5+
+++
6+
7+
Oracle Database 23ai includes a migration path from Advanced Queuing (AQ) to Transactional Event Queues (TxEventQ), to take advantage of enhanced performance and scalability for event-driven architectures.
8+
9+
The [DBMS_AQMIGTOOL](https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_AQMIGTOOL.html) package facilitates a smooth migration process, designed to be non-disruptive and allowing the parallel operation of AQ and TxEventQ during the transition, enabling a smooth cut-over with minimal downtime for your applications.
10+
11+
The migration from AQ to TxEventQ is suitable for various scenarios:
12+
13+
- Scaling up existing AQ-based applications
14+
- Modernizing legacy messaging systems
15+
- Improving performance for high-volume event processing
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
+++
2+
archetype = "chapter"
3+
title = "Getting Started"
4+
weight = 1
5+
+++
6+
7+
Oracle Database Transactional Event Queues (TxEventQ) is a high-performance messaging platform built into Oracle Database, designed for application workflows, microservices, and event-driven architectures. This guide will provide you with a thorough understanding of Oracle Database Transactional Event Queues, enabling you to leverage its powerful features for building robust, scalable, and event-driven applications.
8+
9+
This module will cover the following key topics:
10+
11+
## Core Concepts
12+
- Enqueue/Dequeue vs. Publish/Subscribe models
13+
- Queues, topics, and Dead Letter Queues (DLQ)
14+
- Payload types: RAW, ADT, JSON, and JMS
15+
16+
## Queue Management
17+
- Necessary grants, roles, and permissions for using queues
18+
- Creating, starting, stopping, and dropping queues/topics in various languages
19+
- SQLcl examples for queue operations
20+
21+
## Message Operations
22+
- Producing and consuming messages
23+
- Implementing message selectors and rules
24+
- Handling message delay, expiration, and priority
25+
26+
## Advanced Features
27+
- Transactional messaging: Combining messaging and DML in a single transaction
28+
- Message propagation between queues and databases
29+
- Exception queues and error handling
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
+++
2+
archetype = "chapter"
3+
title = "Kafka APIs"
4+
weight = 2
5+
+++
6+
7+
Oracle Database Transactional Event Queues (TxEventQ) offers comprehensive integration with Apache Kafka, providing developers with a powerful and flexible messaging platform. This module explores the synergy between TxEventQ and Kafka, covering essential concepts and practical implementations. In this module, we'll refer to _queues_ as _topics_ when working with TxEventQ and Kafka.
8+
9+
Throughout this module, we'll explore practical examples using Java code and SQLcl commands to demonstrate:
10+
11+
- Creating and managing topics using Kafka APIs with TxEventQ
12+
- Producing and consuming messages using Kafka client libraries
13+
- Implementing transactional messaging with database operations
14+
- Utilizing Kafka REST APIs for TxEventQ message handling
15+
- Configuring and using Kafka connectors for TxEventQ
16+
17+
By the end of this module, you'll have a comprehensive understanding of how to leverage Oracle TxEventQ's Kafka compatibility features to build robust, scalable, and event-driven applications.
18+
19+
## Kafka and TxEventQ Concepts
20+
21+
TxEventQ and Kafka share several common architectural concepts, making it easier for developers familiar with Kafka to work with TxEventQ. Key concepts include:
22+
23+
- Topics: Logical channels for message streams
24+
- Partitions: Subdivisions of topics for parallel processing
25+
- Offsets: Unique identifiers for messages within a partition
26+
- Hashing keys: Deterministic message routing within partitions
27+
- Brokers: Oracle Database servers hosting topics and partitions
28+
- Ordering: TxEventQ maintains message ordering within partitions, similar to Kafka. Developers can implement partition-level subscribers to ensure ordered message processing.
29+
30+
## Developing with Kafka APIs on TxEventQ
31+
32+
TxEventQ supports Kafka Java APIs through the [Kafka Java Client for Oracle Database Transactional Event Queues](https://github.com/oracle/okafka), allowing developers to leverage existing Kafka knowledge developing against TxEventQ. Key operations include:
33+
34+
- Authenticating to Oracle Database with Kafka APIs
35+
- Creating topics and partitions using Kafka Admin
36+
- Producing messages to topics with Kafka Producers
37+
- Consuming messages from topics using Kafka Consumers
38+
39+
## Kafka Connectors
40+
41+
Oracle offers a Kafka connector for TxeventQ, enabling seamless integration of messages from both platforms. These connectors allow:
42+
43+
- Syncing messages from Kafka topics to TxEventQ queues
44+
- Sourcing messages from TxEventQ for consumption by Kafka clients
45+
46+
## Transactional Messaging
47+
48+
One of TxEventQ's unique features is its ability to combine messaging and database operations within a single transaction. This capability, often referred to as the "transactional outbox" pattern, ensures data consistency across microservices. We'll explore this pattern through the Kafka Java Client for Oracle Database Transactional Event Queues.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
+++
2+
archetype = "chapter"
3+
title = "Performance and Observability"
4+
weight = 4
5+
+++
6+
7+
Oracle TxEventQ offers powerful performance tuning and monitoring capabilities. This module explores advanced techniques for optimizing queue performance and enhancing observability.
8+
9+
## TxEventQ Metrics
10+
11+
TxEventQ provides several comprehensive views for monitoring performance, including insights to message cache statistics, partition level metrics, and subscriber load. This module will dive into accessing and understanding these database views and their content.
12+
13+
## Oracle Database Metrics Exporter
14+
15+
[The Oracle Database Metrics Exporter](https://github.com/oracle/oracle-db-appdev-monitoring) can be configured to export metrics about TxEventQ, providing access to the real-time broker, producer, and consumer metrics in a Grafana dashboard that allows teams to receiving alerts for issues and understand the state of their system.
16+
17+
## Performance Tuning
18+
19+
This module will cover several methods of optimizing TxEventQ performance, including the message cache, streams pool size, and more. Additionally, we'll look at how cross-instance message forwarding, or what happens when you enqueue and dequeue messages across multiple Oracle Database instances.
20+
21+
By leveraging these techniques, you can ensure optimal performance and visibility for your TxEventQ implementations.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
+++
2+
archetype = "chapter"
3+
title = "Spring Boot Integration"
4+
weight = 3
5+
+++
6+
7+
Oracle Transactional Event Queues (TxEventQ) features several Spring Boot integrations, allowing application developers to work with TxEventQ using common Spring idioms and starters. This module explores the various integration points and best practices for leveraging TxEventQ within the Spring ecosystem.
8+
9+
## Spring Boot Starter for AQ/JMS
10+
11+
The Oracle Spring Boot Starter for AQ/JMS simplifies TxEventQ integration with Spring and JMS. Key features include:
12+
13+
- Automatic configuration of JMS ConnectionFactory
14+
- Support for transactional message processing
15+
- Easy setup with Maven or Gradle dependencies
16+
17+
## Spring Boot Starter for Kafka Java Client for Oracle Database Transactional Event Queues
18+
19+
The Kafka Java Client for TxEventQ Spring Boot Starter pulls in all necessary dependencies to work with TxEventQ's [Kafka Java API](https://github.com/oracle/okafka) using Spring Boot.
20+
21+
## TxEventQ Spring Cloud Stream Binder
22+
23+
[Spring Cloud Stream](https://spring.io/projects/spring-cloud-stream) is a Java framework designed for building event-driven microservices backed by a scalable, fault-tolerant messaging systems. The [Oracle Database Transactional Event Queues (TxEventQ) stream binder](https://github.com/oracle/spring-cloud-oracle/tree/main/database/spring-cloud-stream-binder-oracle-txeventq) implementation allows developers to leverage Oracle’s database messaging platform within the Spring Cloud Stream ecosystem, all while keeping your data within the converged database.

0 commit comments

Comments
 (0)