Skip to content

An example of the implementation of the «Publisher-Subscriber» behavioral pattern

Notifications You must be signed in to change notification settings

DeveloperSuccess/PubSub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ru

The «Publisher-Subscriber» pattern

An example of the implementation of the «Publisher-Subscriber» behavioral pattern

Схема поведенческого шаблона (паттерна) «Издатель-подписчик»

The implementation allows for a time-limited asynchronous subscription to receive values using unique keys, the waiting time is set at the discretion of subscribers.

The added values have their own storage period, which by default is 5 minutes, or is set by a variable parameter in the manager constructor. The values are deleted by means of a timer, the trigger period of which is equivalent to the storage period. Expired values that are waiting to be deleted when the timer is triggered are still available for subscribers to receive before they are cleared directly.

Technologies used and implementation features

The Web API was created in C# using technology ASP.NET Core 7.0.

This implementation can be attributed to the following architectural approaches: Clean Architecture / Onion / DDD / Hexagonal architecture.

The project demonstrates the use of CQRS & Mediator patterns, despite the fact that they are redundant in the current solution.

About

An example of the implementation of the «Publisher-Subscriber» behavioral pattern

Resources

Stars

Watchers

Forks