Skip to content

Latest commit

 

History

History
7 lines (7 loc) · 1.62 KB

File metadata and controls

7 lines (7 loc) · 1.62 KB
Name Description
ID Publish-Event
Brief Description The Even Handler is tasked to deliver Event to all relevant Subscribers
Primary Actors Publisher, Event Handler, Subscribers
Preconditions -  Subscriber has to be subscribed with a filter of matching event type, date, and metadata. 
- Subscriber has to be an authorized consumer of the publisher system.
- Publisher has to be registered as a System.
- Publisher has to be a provider of at least one service, registered in the ServiceRegistry.
Main Flow - The Publisher sends an event to the Event Handler.
- The Event Handler validate:
- - the request format
- - the Event source
- - the Event TimeStamp.
- The Event Handler select all Subscribers by the type of the event
- The Event Handler filters Subscribers by authorization.
- The Event Handler filters Subscribers by timestamp.
- The Event Handler filters Subscribers by metadata.
- The Event Handler put the event with the filtered subscribers list into the publishing queue.
-  The Event Handler returns "ok" to publisher.
- PublishingQueueWatcherTask senses new item in the publishing queue.
- PublishingQueueWatcherTask, based on the number of subscribers, pass the event with the filtered subscriber list either to the expressExecutor ( which has a thread pool initialized at startup time ) or creates a new publishRequestExecutor (with its own thread pool ).
- The used Executor, for each Subscriber, execute the PublishEventTask, where it removes the publisher from the event and send the result to the subscriber.