Description

Listens to segment related events and processes them in order to update segment-subscribers entities. This service is crucial for maintaining the integrity of segment data and ensuring that all subscribers are correctly associated with their respective segments.

Data flow

Listens to Kafka events in directory_segments group.

Input

Output

Cache

All subscribers events, regardless of their type, are put into the PendingNewSegmentSubscribersCache, which is a simple in-memory cache that stores subscribers that are pending to be added to segments. This cache is used to avoid unnecessary database queries and to ensure that all subscribers are processed correctly.