|
@ -82,12 +82,12 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ |
|
|
|
|
|
|
|
|
var eventName = @event.GetType().Name; |
|
|
var eventName = @event.GetType().Name; |
|
|
|
|
|
|
|
|
_logger.LogTrace("Creating RabbitMQ channel to publish event: {EventId} ({EventName})", @event.Id, eventName); |
|
|
|
|
|
|
|
|
_logger.LogWarning("Creating RabbitMQ channel to publish event: {EventId} ({EventName})", @event.Id, eventName); |
|
|
|
|
|
|
|
|
using (var channel = _persistentConnection.CreateModel()) |
|
|
using (var channel = _persistentConnection.CreateModel()) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
_logger.LogTrace("Declaring RabbitMQ exchange to publish event: {EventId}", @event.Id); |
|
|
|
|
|
|
|
|
_logger.LogWarning("Declaring RabbitMQ exchange to publish event: {EventId}", @event.Id); |
|
|
|
|
|
|
|
|
channel.ExchangeDeclare(exchange: BROKER_NAME, type: "direct"); |
|
|
channel.ExchangeDeclare(exchange: BROKER_NAME, type: "direct"); |
|
|
|
|
|
|
|
@ -99,7 +99,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ |
|
|
var properties = channel.CreateBasicProperties(); |
|
|
var properties = channel.CreateBasicProperties(); |
|
|
properties.DeliveryMode = 2; // persistent
|
|
|
properties.DeliveryMode = 2; // persistent
|
|
|
|
|
|
|
|
|
_logger.LogTrace("Publishing event to RabbitMQ: {EventId}", @event.Id); |
|
|
|
|
|
|
|
|
_logger.LogWarning("Publishing event to RabbitMQ: {EventId}", @event.Id); |
|
|
|
|
|
|
|
|
channel.BasicPublish( |
|
|
channel.BasicPublish( |
|
|
exchange: BROKER_NAME, |
|
|
exchange: BROKER_NAME, |
|
@ -260,7 +260,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ |
|
|
|
|
|
|
|
|
private async Task ProcessEvent(string eventName, string message) |
|
|
private async Task ProcessEvent(string eventName, string message) |
|
|
{ |
|
|
{ |
|
|
_logger.LogTrace("Processing RabbitMQ event: {EventName}", eventName); |
|
|
|
|
|
|
|
|
_logger.LogWarning("Processing RabbitMQ event: {EventName}", eventName); |
|
|
|
|
|
|
|
|
if (_subsManager.HasSubscriptionsForEvent(eventName)) |
|
|
if (_subsManager.HasSubscriptionsForEvent(eventName)) |
|
|
{ |
|
|
{ |
|
|