Infrastructure prerequisites
Before proceeding with the setup, ensure that the following components have been set up:- Redis
- Kafka
Configuration
Configuring Kafka
Set the following Kafka-related configurations using environment variables:OAuth authentication (when using SASL_PLAINTEXT)
When using the
kafka-auth profile, the security protocol will automatically be set to SASL_PLAINTEXT and the SASL mechanism will be set to OAUTHBEARER.Topic naming configuration
Group IDs
The configuration parameters โKAFKA_CONSUMER_GROUPID_*โ are used to set the consumer group name for Kafka consumers that consume messages from topics. Consumer groups in Kafka allow for parallel message processing by distributing the workload among multiple consumer instances. By configuring the consumer group ID, you can specify the logical grouping of consumers that work together to process messages from the same topic, enabling scalable and fault-tolerant message consumption in your Kafka application.Threads
The configuration parameters โKAFKA_CONSUMER_THREADS_*โ are utilized to specify the number of threads assigned to Kafka consumers for processing messages from topics. These parameters allow you to fine-tune the concurrency and parallelism of your Kafka consumer application, enabling efficient and scalable message consumption from Kafka topics.Events Gateway pattern
Kafka topics related to process instances
Kafka topics related to process commands
Kafka topics related to user messages
Configuring authorization & access roles
Events Gateway validates incoming tokens with the JWT public key mechanism:Service communication
Redis configuration
FlowX Events Gateway uses Redis for real-time message distribution. The process engine sends messages to the events-gateway, which is responsible for sending them to Redis. Events Gateway supports all Redis deployment modes (Standalone, Sentinel, and Cluster). For detailed Redis configuration including all deployment modes and parameters, see the Redis Configuration guide.Quick reference
Common Redis configuration parameters:For complete Redis configuration details including Sentinel mode, Cluster mode, SSL/TLS setup, and troubleshooting, refer to the Redis Configuration guide.
Events
This configuration helps manage how event data is stored and accessed in Redis.SSE cleanup configuration
Configure how Server-Sent Events (SSE) connections are cleaned up:Configuring logging
The following environment variables control log levels:Ingress and CORS
The Events Gateway is exposed on both the admin and public hosts. Routing is configured through the FlowX Helm chart, which renders either a Kubernetes Ingress (default) or a Gateway API HTTPRoute per service. The path is preserved end-to-end (no rewrite), because Server-Sent Events use the same path on the backend as on the client.Service routes
Paths are set through
services.events-gateway.ingress.admin.path / services.events-gateway.ingress.public.path (or the corresponding gateway.<key>.paths) in the chart values. No rewrite is applied because Events Gateway expects the same path on the backend.
Server-Sent Events are long-lived HTTP connections. If you front Events Gateway with a custom ingress controller or reverse proxy, set generous read timeouts (300s+) and disable response buffering on the SSE path.
CORS configuration
Allowed methods, allowed headers, and credential handling are baked into the serviceโs
application.yaml with safe defaults for SSE traffic. Override these only if you have a non-standard requirement.
For the complete route reference, Gateway API HTTPRoute configuration, and route customization, see the ingress configuration guide.
Troubleshooting
Common issues
SSE connections dropping unexpectedly
SSE connections dropping unexpectedly
Symptoms: Clients lose real-time updates intermittently, SSE connections close after a timeout period.Solutions:
- Check your ingress timeout settings โ SSE connections require longer timeouts than standard HTTP requests. Set
proxy-read-timeoutandproxy-send-timeoutto at least3600seconds - Verify keep-alive configuration on your load balancer and ingress controller
- Review the
EVENTS_SSE_CLEANUP_MAXAGEMINUTESsetting โ ensure it is not set too low for your use case - Check for network proxies or firewalls that may terminate long-lived connections
Events not reaching the UI
Events not reaching the UI
Symptoms: Process updates do not appear in the Designer or end-user interface, despite successful process execution.Solutions:
- Verify Kafka consumer configuration โ check that the consumer group IDs match expected values
- Confirm that the
KAFKA_TOPIC_EVENTSGATEWAY_PATTERNmatches the topics being published to by the process engine - Check Kafka consumer lag using your monitoring tools to identify backpressure issues
- Ensure the events-gateway service has network access to Kafka brokers
High latency on events
High latency on events
Symptoms: Noticeable delay between process execution and UI updates.Solutions:
- Check the Redis connection โ verify
SPRING_DATA_REDIS_HOSTandSPRING_DATA_REDIS_PORTare correct and the Redis instance is responsive - Review
EVENTS_REDIS_FREQUENCYMILLISโ lower values reduce latency but increase Redis load - Check Kafka partition configuration โ ensure sufficient partitions for your consumer thread count
- Monitor Kafka consumer thread counts (
KAFKA_CONSUMER_THREADS_*) and increase if threads are saturated
WebSocket connection failures
WebSocket connection failures
Symptoms: Browser console shows WebSocket or SSE connection errors, CORS-related error messages.Solutions:
- Verify CORS settings in your ingress configuration allow the Designer and application domains
- Ensure the ingress controller supports WebSocket upgrades and SSE connections
- Check that the ingress path pattern
/api/events(/|$)(.*)(/|$)(.*)is correctly configured - Confirm that the
events-gatewayservice is reachable from the ingress controller
Related resources
Ingress Configuration
Configure routing, CORS, and SSE-specific ingress settings
Redis Configuration
Complete Redis setup including Sentinel and Cluster modes
FlowX Engine Setup
Configure the process engine that publishes events to the gateway

