Skip to content

Commit ffe7916

Browse files
authored
Update TxEventQ demo (#104)
* update TxEventQ samples --------- Signed-off-by: Mark Nelson <[email protected]>
1 parent 045ae01 commit ffe7916

File tree

11 files changed

+585
-442
lines changed

11 files changed

+585
-442
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ dist/
66
*.key
77
oci8.pc
88
*.skip
9-
.vscode
9+
.vscode
10+
**/target/

README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ The exporter includes a set of metrics for monitoring TxEventQ and a pre-built G
746746

747747
> Note: The metrics are written for Oracle Database 21c or later.
748748
749-
### How to create a topic
749+
### How to create some traffic with PL/SQL
750750

751751
If you need to create a topic to monitor, you can use these statements to create and start a topic, and create a subscriber:
752752

@@ -807,6 +807,19 @@ begin
807807
end;
808808
```
809809

810+
### How to create some traffic with Java (Spring Boot)
811+
812+
A simple load generator is provided in [this directory](./docker-compose/txeventq-load/) which you can use to create some traffic so you can experiment with the sample dashboard.
813+
814+
To run the sample, first update [application.yaml](./docker-compose/txeventq-load/src/main/resources/application.yaml) with the correct IP address for your database, then start the application as follows:
815+
816+
```bash
817+
mvn spring-boot:run
818+
```
819+
820+
The application will create ten queues names TOPIC_0 through TOPIC_9 and randomly produce and consume messages on those queues. The example dashboard shown below was monitoring traffic produced using this application.
821+
822+
810823
### Metrics definitions
811824

812825
The metrics definitions are provided in [this file](./custom-metrics-example/txeventq-metrics.toml). You need to provide this file to the exporter, e.g., by adding it to your container image, or creating a Kubernetes config map containing the file and mounting that config map as a volume in your deployment. You also need to set the `CUSTOM_METRICS` environment variable to the location of this file.
@@ -835,7 +848,7 @@ A Grafana dashboard for Transactional Event Queues is provided [in this file](./
835848
836849
The dashboard will look like this:
837850

838-
![](./doc/txeventq-dashboard.png)
851+
![](./doc/txeventq-dashboard-v2.png)
839852

840853
## Developer notes
841854

doc/txeventq-dashboard-v2.png

389 KB
Loading

docker-compose/compose.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ services:
4848
ports:
4949
- 9161:9161
5050
environment:
51-
- DB_USERNAME=system
51+
- DB_USERNAME=pdbadmin
5252
- DB_PASSWORD=Welcome12345
53-
- DB_CONNECT_STRING=free23c:1521/free
53+
- DB_CONNECT_STRING=free23c:1521/freepdb1
5454
- CUSTOM_METRICS=/exporter/txeventq-metrics.toml
5555
volumes:
5656
- ./exporter:/exporter

0 commit comments

Comments
 (0)