Integrating with notification service
On this page:
🌐 This document is available in both English and Ukrainian. Use the language toggle in the top right corner to switch between versions. |
1. General provisions
In order to prevent the blocking of the main flow of execution, the principle of separating the publication of the event about the need to perform the operation from its actual execution using the publish-subscribe approach implemented with the help of Kafka is used. The complete list, settings and structures of event objects can be found at link.
To simplify the integration, a separate library ddm-starter-notifications is implemented, which provides a Java API for publishing requests to send messages. |
An example of service settings for publishing events via a Kafka topic (using the ddm-starter-kafka library as an example)
data-platform:
kafka:
producer:
key-serializer: org.apache.kafka.common.serialization.StringSerializer
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
custom-config:
"[enable.idempotence]": true
topic-properties:
creation:
enabled: true
timeout-in-seconds: 60
retention:
default-in-days: 7
num-partitions: 1
replication-factor: 1
error-handler:
initial-interval: 1500
max-elapsed-time: 6000
multiplier: 2
topics:
"user-notifications": "user-notifications"
2. Integration examples according to usage scenarios
2.1. Integration of mechanisms for sending messages to the Business Process Management System
The solution is based on the use of the Camunda concept Java Delegate to perform operations for sending messages from the business process. Simplification of the modeling experience is implemented with the help of individual typical extensions.