This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Startup | |
{ | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
... | |
var rabbitMqOptions = Configuration.GetSection("RabbitMq").Get<RabbitMqOptions>(); | |
services.AddRabbitMqConnection(rabbitMqOptions); | |
services.AddRabbitMqRegistration(rabbitMqOptions); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ItemCreatedIntegrationEventHandler : IIntegrationEventHandler<ItemCreatedIntegrationEvent> | |
{ | |
public ItemCreatedIntegrationEventHandler() | |
{ | |
} | |
public async Task Handle(ItemCreatedIntegrationEvent @event) | |
{ | |
//Handle the ItemCreatedIntegrationEvent event here. | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ItemCreatedIntegrationEvent : IntegrationEvent | |
{ | |
public string Title { get; set; } | |
public string Description { get; set; } | |
public ItemCreatedIntegrationEvent(string title, string description) | |
{ | |
Title = title; | |
Description = description; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"RabbitMq": { | |
"BrokerName": "test_broker", | |
"QueueName": "test_queue_pub", | |
"RetryCount": "5", | |
"VirtualHost": "your_virtual_host", | |
"Username": "your_username", | |
"Password": "your_password", | |
"Host": "your_host", | |
"DispatchConsumersAsync": true |
NewerOlder