Skip to content

Commit a658189

Browse files
Merge pull request #1031 from oracle/txeventq-edits
TxEventQ Edits
2 parents 521a68a + e657e49 commit a658189

File tree

5 files changed

+23
-27
lines changed

5 files changed

+23
-27
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight = 5
66

77
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.
88

9-
Advanced Queuing (AQ) has been Oracle’s traditional messaging system for managing asynchronous communication in enterprise applications, allowing reliable queuing and message delivery. TxEventQ leverages Kafka-based event queuing, offering improved throughput, lower latency, and greater scalability, making it ideal for modern event-driven architectures and high-volume event processing.
9+
Advanced Queuing (AQ) has been Oracle’s database messaging system for managing asynchronous communication in enterprise applications, allowing reliable queuing and message delivery. TxEventQ leverages Kafka-based event queuing, offering improved throughput, lower latency, and greater scalability, making it ideal for modern event-driven architectures and high-volume event processing.
1010

1111
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.
1212

docs-source/transactional-event-queues/content/aq-migration/migration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The migration tool interface provides the following functionalities:
4747
4. Once the AQ is drained or purged, the DBMS_AQMIGTOOL.COMMIT_MIGRATION procedure drops the AQ and renames the interim TxEventQ to the AQ's name, ensuring application compatibility.
4848
1. If using DBMS_AQMIGTOOL.AUTOMATIC migration mode, commit is not required.
4949

50-
In the event of an error the prevents migration from continuing, AQ migration may be cancelled and the in-flight messages restored to the AQ without data loss.
50+
In the event of an error that prevents migration from continuing, AQ migration may be cancelled and the in-flight messages restored to the AQ without data loss.
5151

5252
### Checking Compatibility
5353

@@ -71,7 +71,7 @@ If the output is similar to "Migration report unsupported events count: 0", then
7171

7272
The [INIT_MIGRATION](https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_AQMIGTOOL.html#GUID-4D2A3314-9ADF-43DE-9201-74A8F9DB03FE) procedure is used to begin AQ migration to TxEventQ. The `mig_mode` parameter is used to control the migration type and defaults to `DBMS_AQMIGTOOL.INTERACTIVE` which allows both enqueue and dequeue during migration. A full description of `mig_mode` options is available in the procedure documentation.
7373

74-
The following SQL script starts migration for the AQ `my_queue` in the `testuser` schema. Once migration starts, an interim TxEventQ will be created named `my_queue_m` the includes a copy of the existing AQ configuration.
74+
The following SQL script starts migration for the AQ `my_queue` in the `testuser` schema. Once migration starts, an interim TxEventQ will be created named `my_queue_m` that includes a copy of the existing AQ configuration.
7575

7676
```sql
7777
begin
@@ -186,7 +186,7 @@ end;
186186
/
187187
```
188188

189-
The [RECOVER_MIGRATION](https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_AQMIGTOOL.html#GUID-755EEB52-BFAE-4FEA-A933-07546D72DD98) procedure can be used to restore a migration to the nearest safe point, either before or after the execution of DBMS_AQMIGTOOL.CANCEL_MIGRATION, DBMS_AQMIGTOOL.COMMIT_MIGRATION, or DBMS_AQMIGTOOL.INIT_MIGRATION.
189+
The [RECOVER_MIGRATION](https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_AQMIGTOOL.html#GUID-755EEB52-BFAE-4FEA-A933-07546D72DD98) procedure can be used to restore a migration to the nearest safe point, either before or after the execution of DBMS_AQMIGTOOL.CANCEL_MIGRATION, DBMS_AQMIGTOOL.COMMIT_MIGRATION, or DBMS_AQMIGTOOL.INIT_MIGRATION. You may wish to use the RECOVER_MIGRATION procedure if an unexpected error has occurred, or the use of an unsupported feature is detected in the [USER_TXEVENTQ_MIGRATION_STATUS](https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/USER_TXEVENTQ_MIGRATION_STATUS.html#REFRN-GUID-07BAF678-A893-4616-B559-E78E90EE1972) view.
190190

191191
The following SQL script recovers migration to the nearest safe point, and outputs the recovery message:
192192

@@ -209,11 +209,11 @@ end;
209209
The following features are unsupported in TxEventQ, and should be mitigated before migration:
210210

211211
- Queue Retry Delay: Set `retry_delay` to zero using DBMS_AQADM.ALTER_QUEUE.
212-
- Message transactions on enqueue/dequeue: Move the transformation to the application layer.
212+
- Message transaction on enqueue/dequeue: Move the transformation to the application layer.
213213
- Multi-queue listeners: Implement single queue listening with dequeue browse.
214214
- Priority values outside the range 0-9: Adjust priority values to the range 0-9.
215215

216-
The following features do support migration. Applications using these features must be modified before migration:
216+
The following features do not support migration. Applications using these features must be modified before migration:
217217

218218
- Message grouping.
219219
- Sequence deviation and relative message id.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ TxEventQ provides [administrative views](https://docs.oracle.com/en/database/ora
1616

1717
## Performance Tuning
1818

19-
This module will cover several methods of optimizing TxEventQ performance, including the message cache, streams pool size, and more.
19+
This module will cover several methods of optimizing TxEventQ performance, including the message cache, Streams pool size, and more.
2020

2121
By leveraging these techniques, you can ensure optimal performance and visibility for your TxEventQ implementations.

docs-source/transactional-event-queues/content/observability/tuning.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ weight = 3
77
Performance tuning is critical for ensuring the efficiency, reliability, and responsiveness of TxEventQ event processing. As systems scale and the volume of events increases, poor optimizations can lead to latency, bottlenecks, or even system failures. By applying the techniques described in this section, TxEventQ administrators can significantly enhance throughput, reduce latency, and improve the stability of event driven applications.
88

99

10-
* [Partitioning/Sharding and Multiple Consumers](#partitioningsharding-and-multiple-consumers)
10+
* [Event Streams and Multiple Consumers](#event-streams-and-multiple-consumers)
1111
* [Creating a Partitioned Kafka Topic](#creating-a-partitioned-kafka-topic)
1212
* [Message Cache Optimization](#message-cache-optimization)
1313
* [Tuning System Parameters](#tuning-system-parameters)
@@ -21,30 +21,30 @@ Performance tuning is critical for ensuring the efficiency, reliability, and res
2121
* [STREAMS_POOL_SIZE](#streams_pool_size)
2222

2323

24-
## Partitioning/Sharding and Multiple Consumers
24+
## Event Streams and Multiple Consumers
2525

26-
Oracle Database automatically manages the database table partitions of a queue. As queue volume fluctuates, partitions may be dynamically created as necessary, for example, when the queue table expands due to a message backlog. Once all messages are dequeued and no longer needed, the database table partition is truncated and made available for reuse.
26+
Oracle Database automatically manages the database table partitions of a queue. As queue volume fluctuates, table partitions may be dynamically created as necessary, for example, when the queue table expands due to a message backlog. Once all messages are dequeued and no longer needed, the database table partition is truncated and made available for reuse.
2727

28-
Queue partitions (or shards) can be configured on a queue during creation. A higher number of partitions per queue improves dequeue performance through consumer parallelization, but requires additional memory and database resources. When messages are enqueued, each message is routed to a specific partition of the queue. Messages within a partition maintain a strict, session-level ordering.
28+
Queue event streams can be configured on a queue during creation. A higher number of event streams per queue improves dequeue performance through consumer parallelization, but requires additional memory and database resources. When messages are enqueued, each message is routed to a specific event stream of the queue. Messages within an event stream maintain a strict, session-level ordering.
2929

30-
If you wish to manually set the number of partitions/shards for a queue, you may do so using the [SET_QUEUE_PARAMETER](https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_AQADM.html#GUID-E592137F-BB8E-49A2-80C2-C055358566C9) procedure. The following SQL script creates a queue, and configures it to have 5 partitions/shards and key based enqueue. Key based enqueue allows message routing to a specific shard within a queue by providing a message key at enqueue time.
30+
If you wish to manually set the number of event streams for a queue, you may do so using the [SET_QUEUE_PARAMETER](https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_AQADM.html#GUID-E592137F-BB8E-49A2-80C2-C055358566C9) procedure. The following SQL script creates a queue, and configures it to have 5 event streams and key based enqueue. Key based enqueue allows message routing to a specific event stream within a queue by providing a message key at enqueue time.
3131

3232
```sql
3333
begin
3434
dbms_aqadm.create_transactional_event_queue(
35-
queue_name => 'partitioned_queue',
35+
queue_name => 'my_queue',
3636
queue_payload_type => DBMS_AQADM.JMS_TYPE,
3737
multiple_consumers => true
3838
);
3939

40-
-- Set the queue to have 5 partitions/shards
41-
dbms_aqadm.set_queue_parameter('partitioned_queue', 'SHARD_NUM', 5);
42-
-- The partition/shard for enqueued messages is determined by the message key
43-
dbms_aqadm.set_queue_parameter('partitioned_queue', 'KEY_BASED_ENQUEUE', 1);
40+
-- Set the queue to have 5 event streams
41+
dbms_aqadm.set_queue_parameter('my_queue', 'SHARD_NUM', 5);
42+
-- The event stream for enqueued messages is determined by the message key
43+
dbms_aqadm.set_queue_parameter('my_queue', 'KEY_BASED_ENQUEUE', 1);
4444

4545
-- Start the queue
4646
dbms_aqadm.start_queue(
47-
queue_name => 'partitioned_queue'
47+
queue_name => 'my_queue'
4848
);
4949
end;
5050
/
@@ -54,7 +54,7 @@ It is recommended to avoid creating global indexes on the partitioned table that
5454

5555
### Creating a Partitioned Kafka Topic
5656

57-
The following Java code snippet creates a TxEventQ topic with 5 partitions using the [Kafka Java Client for Oracle Database Transactional Event Queues](https://github.com/oracle/okafka). The `my_topic` topic may have up to 5 distinct consumer threads per consumer group, increasing parallelization.
57+
The following Java code snippet creates a TxEventQ topic with 5 Kafka partitions (5 TxEventQ event streams) using the [Kafka Java Client for Oracle Database Transactional Event Queues](https://github.com/oracle/okafka). When working with TxEventQ, we'll refer to Kafka topic partitions as event streams. The `my_topic` topic may have up to 5 distinct consumer threads per consumer group, increasing parallelization.
5858

5959
```java
6060
Properties props = // Oracle Database connection properties
@@ -72,7 +72,7 @@ Note that you can use as many producers per topic as required, though it is reco
7272

7373
### Message Cache Optimization
7474

75-
TxEventQ includes a specialized message cache that allows administrators to balance [System Global Area (SGA)](https://docs.oracle.com/en/database/oracle/oracle-database/23/dbiad/db_sga.html) usage and queue performance. Management of TxEventQ's SGA usage benefits throughput, reduces latency, and allows greater concurrency. When paired with partitioning, message caching reduces the need for certain queries, DML operations, and indexes. The cache is most effective when consumers can keep up with producers, and when it is large enough to store the messages (including payloads) for all consumers and producers for using TxEventQ.
75+
TxEventQ includes a specialized message cache that allows administrators to balance [System Global Area (SGA)](https://docs.oracle.com/en/database/oracle/oracle-database/23/dbiad/db_sga.html) usage and queue performance. Management of TxEventQ's SGA usage benefits throughput, reduces latency, and allows greater concurrency. When paired with event streams, message caching reduces the need for certain queries, DML operations, and indexes. The cache is most effective when consumers can keep up with producers, and when it is large enough to store the messages (including payloads) for all consumers and producers for using TxEventQ.
7676

7777
The message cache uses the Oracle Database Streams pool. You can fine-tune the memory allocation for the Streams pool using the DBMS_AQADM [SET_MIN_STREAMS_POOL](https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_AQADM.html#GUID-773FA544-1450-4A9E-BAA7-08ACF059D3EB) and [SET_MAX_STREAMS_POOL](https://docs.oracle.com/en/database/oracle/oracle-database/23/arpls/DBMS_AQADM.html#GUID-9375E6C8-1BC0-4E45-8045-143927DD751C) procedures.
7878

@@ -103,10 +103,6 @@ where name = 'sga_target';
103103

104104
The default block size of 8k is recommended. The block size of a database cannot be changed after database creation.
105105

106-
### [JAVA_POOL_SIZE](https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/JAVA_POOL_SIZE.html)
107-
108-
The JAVA_POOL_SIZE parameter specifies the size (in bytes) of the Java pool, used by the Java memory manager for Java-related operations like method and class definitions, and Java objects during execution. If the SGA_TARGET is not set, it defaults to 24 MB. JAVA_POOL_SIZE is modifiable via ALTER SYSTEM, and its range depends on the operating system.
109-
110106
### [OPEN_CURSORS](https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/OPEN_CURSORS.html)
111107

112108
The OPEN_CURSORS parameter defines the maximum number of open cursors a session can have in Oracle. The default value is 50, and it can be adjusted between 0 and 65535. If you are running a large amount of producers and consumers, it’s essential to set this value high enough to avoid running out of cursors. You can modify OPEN_CURSORS using the ALTER SYSTEM command.
@@ -127,7 +123,7 @@ The SESSIONS parameter defines the maximum number of sessions that can be create
127123

128124
### [SGA_TARGET](https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/SGA_TARGET.html)
129125

130-
The SGA_TARGET parameter specifies the total size of the Shared Global Area (SGA) in Oracle, allowing automatic memory management of its components like the buffer cache, shared pool, and others. Its value can range from 64 MB to SGA_MAX_SIZE. It is modifiable via ALTER SYSTEM. If set to zero, SGA autotuning is disabled. Systems that make heavy using of message queueing should configure SGA_TARGET to an appropriately large value to get the most out of queue [message caching](#message-cache).
126+
The SGA_TARGET parameter specifies the total size of the System Global Area (SGA) in Oracle, allowing automatic memory management of its components like the buffer cache, shared pool, and others. Its value can range from 64 MB to SGA_MAX_SIZE. It is modifiable via ALTER SYSTEM. If set to zero, SGA autotuning is disabled. Systems that make heavy using of message queuing should configure SGA_TARGET to an appropriately large value to get the most out of queue [message caching](#message-cache-optimization).
131127

132128
If SGA_TARGET is specified, then the following memory pools are automatically sized:
133129
- Buffer cache (DB_CACHE_SIZE)
@@ -141,4 +137,4 @@ If SGA_TARGET is specified, then the following memory pools are automatically si
141137

142138
The STREAMS_POOL_SIZE parameter defines the size of the Streams pool, a shared memory area used for TxEventQ and other database features. If SGA_TARGET and STREAMS_POOL_SIZE are both nonzero, Oracle Database Automatic Shared Memory Management uses this value as a minimum for the Streams pool.
143139

144-
If both the STREAMS_POOL_SIZE and the SGA_TARGET parameters are set to 0, then the first request for Streams pool memory will transfer 10% of the buffer cache shared pool is transferred to the Streams pool.
140+
If both the STREAMS_POOL_SIZE and the SGA_TARGET parameters are set to 0, then the first request for Streams pool memory will transfer 10% of the buffer cache shared pool to the Streams pool.

docs-source/transactional-event-queues/content/observability/views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The `V$EQ_NONDUR_SUBSCRIBER` view provides details about non-durable subscriptio
5050

5151
### [V$EQ_NONDUR_SUBSCRIBER_LWM](https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/V-EQ_NONDUR_SUBSCRIBER_LWM.html#REFRN-GUID-98D91CB7-5EA3-47EB-90D3-A8BF0047D3B8)
5252

53-
The V$EQ_NONDUR_SUBSCRIBER_LWM view provides information about the low watermarks (LWMs) of non-durable subscribers in a Transactional Event Queue (TxEventQ). The LWM represents the lowest point in an event stream partition that a non-durable subscriber has processed.
53+
The V$EQ_NONDUR_SUBSCRIBER_LWM view provides information about the low watermarks (LWMs) of non-durable subscribers in a Transactional Event Queue (TxEventQ). The LWM of a subscriber represents a position within an event stream below which none of the messages are of interest to the subscriber.
5454

5555
### [V$EQ_PARTITION_STATS](https://docs.oracle.com/en/database/oracle/oracle-database/23/refrn/V-EQ_PARTITION_STATS.html#REFRN-GUID-4EA74E81-4664-436E-B58A-0857DDBD81F7)
5656

0 commit comments

Comments
 (0)