Dependencies
Before setting up the plugin, ensure you have the following dependencies:- A MongoDB database for storing notification templates and records
- Access to the Kafka instance used by the FlowX.AI Engine
- A Redis instance for caching notification templates
- An S3-compatible file storage solution (e.g., Min.io) if you need to attach documents to notifications
Authorization configuration
Set these variables to connect to your identity management platform:MongoDB configuration
The only thing that needs to be configured is the DB access info, the rest will be handled by the plugin.Redis configuration
Configure your Redis caching instance:Kafka configuration
Core Kafka settings
Topic naming configuration
Topic configurations
Each action in the service corresponds to a Kafka event on a specific topic. Configure the following topics:OTP topics
Notification topics
Audit topic
File storage configuration
Based on use case you can use directly a file system or an S3 compatible cloud storage solution (for example min.io). The file storage solution can be configured using the following environment variables:When using S3-compatible storage for notifications with attachments, the S3 user configured through
APPLICATION_FILESTORAGE_S3_ACCESSKEY and APPLICATION_FILESTORAGE_S3_SECRETKEY must have read access to multiple buckets beyond its own:Required bucket access:- Own bucket - defined by
APPLICATION_FILESTORAGE_S3_BUCKETPREFIX - Documents Plugin bucket - defined in the Documents Plugin configuration via
APPLICATION_FILESTORAGE_S3_BUCKETPREFIX - CMS Core public bucket - defined in the CMS Core configuration via
APPLICATION_FILESTORAGE_S3_BUCKETNAME - Integration Designer bucket - defined in the Integration Designer configuration via
APPLICATION_FILESTORAGE_S3_BUCKETPREFIX
SMTP setup
Configure SMTP settings for sending email notifications:Email attachments configuration
Configure handling of email attachments:OTP configuration
Configure One-Time Password generation and validation:Logging configuration
Control logging levels for different components:Usage notes
Topic naming convention
Topics follow a standardized naming convention:- Example:
ai.flowx.dev.plugin.notification.trigger.generate.otp.v1 - Structure:
{package}.{environment}.{component}.{action}.{subject}.{version}
Consumer error handling
WhenKAFKA_CONSUMER_ERRORHANDLING_ENABLED is set to true:
- The application will retry processing failed messages according to
KAFKA_CONSUMER_ERRORHANDLING_RETRIES - Between retries, the application will wait for the duration specified by
KAFKA_CONSUMER_ERRORHANDLING_RETRYINTERVAL
KAFKA_CONSUMER_ERRORHANDLING_RETRYINTERVAL is set to 5000 (5 seconds) and KAFKA_CONSUMER_ERROR_HANDLING_RETRIES is set to 5, the consumer application will make up to 5 attempts, waiting 5 seconds between each attempt.
Message size configuration
TheKAFKA_MESSAGE_MAX_BYTES setting affects multiple Kafka properties:
spring.kafka.producer.properties.message.max.bytesspring.kafka.producer.properties.max.request.sizespring.kafka.consumer.properties.max.partition.fetch.bytes
OAuth authentication
When using the ‘kafka-auth’ profile, the security protocol changes to ‘SASL_PLAINTEXT’ and requires OAuth configuration via theKAFKA_OAUTH_* variables.
