Binding queue using existing cosumerChannel ()

Co-authored-by: Alan.Yu <alan.yu@hidglobal.com>
This commit is contained in:
AlanYu 2021-07-07 15:34:25 +08:00 committed by GitHub
parent 8bb15ce987
commit 5c57b8c3f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -143,13 +143,10 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ
{
_persistentConnection.TryConnect();
}
using (var channel = _persistentConnection.CreateModel())
{
channel.QueueBind(queue: _queueName,
exchange: BROKER_NAME,
routingKey: eventName);
}
_consumerChannel.QueueBind(queue: _queueName,
exchange: BROKER_NAME,
routingKey: eventName);
}
}