-
-
Notifications
You must be signed in to change notification settings - Fork 1
Publish Message
Bernardo Teixeira edited this page Oct 22, 2021
·
1 revision
To publish your message can DI the IEventBus interface.
private readonly IEventBus _eventBus; public WeatherForecastController(IEventBus eventBus) { _eventBus = eventBus; }
Call the Publish method when you need it.
_eventBus.Publish(new EventFromMicroserviceA() { Message = Summaries[rng.Next(Summaries.Length)], Name="test01" });