Architecture¶
The user management strongly interacts with the EIS IdentityProvider (IDP). All changes on a user or tenant are submitted with a message queue (RabbitMQ) to the IDP. All data is exchanged with RabbitMQ as message queue (MQ).
Transmitting User and Tenant changes¶
All relevant changes on a user or tenant are transmitted to the rabbit MQ exchange eis-usermgmnt-users. Both the IDP and User Management uses Wolverine as messaging framework.
Workflow: Submitting User Data to RabbitMQ with Wolverine¶
This document describes the workflow for submitting user and tenant data to a RabbitMQ exchange using Wolverine, following a structured event-processing pipeline.
The workflow ensures reliable processing, aggregation, and delivery of events to the exchange eis-idp-events-v1.
Steps in the Workflow¶
-
Apply Event to Snapshot
When a user or tenant change occurs, a corresponding event is generated and applied to its Snapshot. -
Purpose: The Snapshot maintains the current state of the user or tenant, ensuring consistency and allowing the system to evaluate the impact of each event.
-
Aggregate Events
The generated events are processed by an AggregateHandler. -
Function: Converts raw events into
UserEventDataobjects. -
These objects represent a structured view of the changes, encapsulating relevant information for further processing.
-
Temporary Storage
TheUserEventDataobjects are stored temporarily. -
Duration: The storage period is determined by a configurable time setting.
-
Purpose: This intermediate step allows batching of events over a specified time window.
-
Batch Processing
A BatchHandler groups events for processing. -
Grouping Logic: Events are grouped by the associated user within the defined time window, with a maximum of 50 events per batch.
-
Purpose: Reduces the number of separate messages sent to RabbitMQ, optimizing performance and message transmission.
-
Publishing to RabbitMQ
The aggregated events are published to the RabbitMQ exchangeeis-idp-events-v1. - Exchange Details:
- Name:
eis-idp-events-v1 - Type: (Assume direct, topic, or fanout depending on requirements)
- Name:
- Outcome: The events are made available for consumers subscribed to the exchange, ensuring timely and structured delivery of user and tenant updates.
Workflow Diagram¶
graph TD
A[Event Generated] --> B[Apply to Snapshot]
B --> |Collects Changes from User, Tenant and global Claims| C[AggregateHandler: Create UserEventData]
C --> D[Outbox Storage]
D -->|Wait for a Configurable Time| E[BatchHandler: Group by User]
E --> |Max 50 Events| H[Outbox Storage]
H --> F[Publish to RabbitMQ Exchange]
subgraph RabbitMQ
F --> G[Exchange: eis-idp-events-v1]
end
Error Handling¶
This workflow ensures a robust and efficient pipeline for submitting user data to RabbitMQ, leveraging Wolverine's event-driven architecture.