Binding queue using existing cosumerChannel (#1716)

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

View File

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