Skip to content

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).

Component Overview Usermanagement / IDP

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

  1. Apply Event to Snapshot
    When a user or tenant change occurs, a corresponding event is generated and applied to its Snapshot.

  2. 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.

  3. Aggregate Events
    The generated events are processed by an AggregateHandler.

  4. Function: Converts raw events into UserEventData objects.

  5. These objects represent a structured view of the changes, encapsulating relevant information for further processing.

  6. Temporary Storage
    The UserEventData objects are stored temporarily.

  7. Duration: The storage period is determined by a configurable time setting.

  8. Purpose: This intermediate step allows batching of events over a specified time window.

  9. Batch Processing
    A BatchHandler groups events for processing.

  10. Grouping Logic: Events are grouped by the associated user within the defined time window, with a maximum of 50 events per batch.

  11. Purpose: Reduces the number of separate messages sent to RabbitMQ, optimizing performance and message transmission.

  12. Publishing to RabbitMQ
    The aggregated events are published to the RabbitMQ exchange eis-idp-events-v1.

  13. Exchange Details:
    • Name: eis-idp-events-v1
    • Type: (Assume direct, topic, or fanout depending on requirements)
  14. 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.