This library provides an internal queue system that publishes events into it, allowing the queue to be processed in the background for efficient event handling.
This library provides an internal queue system that publishes events into it, allowing the queue to be processed in the background for efficient event handling.
To integrate InternalMemoryQueue
and InternalEventBus
into your application, simply add the following code to your dependency injection (DI) setup:
services.InjectInternalEventBus();
InjectInternalEventBus()
is an extension method available on IServiceCollection
.
IInternalEvent
to define your custom event.IIEventHandler
to implement your event handling logic.IEventBus
to your service through dependency injection.Publish
method on eventBus
and pass your event instance to it.This streamlined process ensures your application can handle events asynchronously, enhancing performance and responsiveness.