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

Added message cleaner configuration. Added database schema. Added micronaut details for DomainEventDispatcher. Fixed rabbitmq docs. #42

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
81 changes: 81 additions & 0 deletions src/docs/asciidoc/cdc-configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,87 @@ The Eventuate Tram CDC supports `eventuate-tram` and `eventuate-local`

|===

==== Configuring a cleaner

Cdc can automatically remove old messages from message table and received_message table.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should explain that you configure one or more named cleaners.
Each clean can clean a message table and/or a received_message table.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will add that

Example configuration:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please describe what this configuration does.
Also, please have properties for configuring received_message table too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok


----
EVENTUATE_CDC_CLEANER_C1_PIPELINE: P4
EVENTUATE_CDC_CLEANER_C1_MESSAGE_CLEANING_ENABLED: "true"
EVENTUATE_CDC_CLEANER_C1_MESSAGES_MAX_AGE_IN_SECONDS: 1
EVENTUATE_CDC_CLEANER_C1_INTERVAL_IN_SECONDS: 1
...
----

If pipeline is specified, pipeline database configuration is used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would the user NOT want to specify the pipeline?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. But probably we discussed this option when I was working on implementation.

If not, please specify parameters explicitly:

----
EVENTUATE_CDC_CLEANER_C3_DATASOURCE_URL: jdbc:postgresql://postgreswalpipeline/eventuate
EVENTUATE_CDC_CLEANER_C3_DATASOURCE_USERNAME: eventuate
EVENTUATE_CDC_CLEANER_C3_DATASOURCE_PASSWORD: eventuate
EVENTUATE_CDC_CLEANER_C3_DATASOURCE_DRIVER_CLASSNAME: org.postgresql.Driver
EVENTUATE_CDC_CLEANER_C3_MESSAGE_CLEANING_ENABLED: "true"
EVENTUATE_CDC_CLEANER_C3_MESSAGES_MAX_AGE_IN_SECONDS: 1
EVENTUATE_CDC_CLEANER_C3_INTERVAL_IN_SECONDS: 1
...
----

Full list of configuration properties
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something seems to be missing here that explains what EVENTUATE_CDC_CLEANER_C3 is, e.g. eventuate.cdc.cleaner is some root property name, c3 is the name of a specific cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will add


[cols=3, options="header"]
|===
| Name
| Description
| Default Value

| dataSourceUrl
| jdbc connection url
| -

| dataSourceUserName
| jdbc username
| -

| dataSourcePassword
| jdbc password
| -

| dataSourceDriverClassName
| jdbc driver class name
| -

| eventuateSchema
| database schema
| depends on RDBMS

| pipeline
| pipeline name (used instead of jdbc configuration)
| -

| messageCleaningEnabled
| enables message table cleaning
| false

| messagesMaxAgeInSeconds
| max age of message to remove
| 2 days

| receivedMessageCleaningEnabled
| enables received_message table cleaning
| false

| receivedMessagesMaxAgeInSeconds
| max age of received_message to remove
| 2 days

| intervalInSeconds
| how often cdc starts cleaning
| every minute

|===

=== Configuring the publisher

The publisher is invoked by the pipeline to publish a message/event to the message broker.
Expand Down
4 changes: 4 additions & 0 deletions src/docs/asciidoc/getting-started-eventuate-tram.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,10 @@ public class AbstractTramEventTestConfiguration {

See this example of https://github.com/eventuate-tram-examples/eventuate-tram-core-quarkus-examples-basic/blob/main/eventuate-tram-examples-common/src/main/java/io/eventuate/tram/examples/basic/events/AbstractTramEventTestConfiguration.java[transaction events].

Please note: if you want to have several dispatchers, you will need to use @Named annotation (https://docs.oracle.com/javaee/6/api/javax/inject/Named.html)
on DomainEventDispatcher bean definitions. To initialize DomainEventDispatcher objects, eventuate framework iterates over all beans
of that type and those beans should have unique names, otherwise only one of them will be retrieved from IoC container (micronaut specific behavior)
without any explicit error.

=== Transactional commands

Expand Down