|
|
|
@ -16,14 +16,14 @@ namespace OpenAuth.WebApi.Model.RabbitMQService
|
|
|
|
|
{
|
|
|
|
|
_factory = new ConnectionFactory
|
|
|
|
|
{
|
|
|
|
|
//HostName = "123.132.248.154",
|
|
|
|
|
//UserName = "DHCloudg1",
|
|
|
|
|
//Password = "Cloud0#4fCraQrm",
|
|
|
|
|
//Port = 9103
|
|
|
|
|
HostName = "localhost",
|
|
|
|
|
UserName = "guest",
|
|
|
|
|
Password = "guest",
|
|
|
|
|
Port = 5672
|
|
|
|
|
HostName = "123.132.248.154",
|
|
|
|
|
UserName = "DHCloudg1",
|
|
|
|
|
Password = "Cloud0#4fCraQrm",
|
|
|
|
|
Port = 9103
|
|
|
|
|
//HostName = "localhost",
|
|
|
|
|
//UserName = "guest",
|
|
|
|
|
//Password = "guest",
|
|
|
|
|
//Port = 5672
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
public async Task AddQueueBindingAsync(string exchange, string exchangeType, string routingKey)
|
|
|
|
@ -44,7 +44,7 @@ namespace OpenAuth.WebApi.Model.RabbitMQService
|
|
|
|
|
{
|
|
|
|
|
_connection = await _factory.CreateConnectionAsync(stoppingToken);
|
|
|
|
|
_channel = await _connection.CreateChannelAsync();
|
|
|
|
|
await BindQueueAsync(_channel, "processing_event", "topic", "event.trafficJunction.1.sdhc");
|
|
|
|
|
//await BindQueueAsync(_channel, "processing_event", "topic", "event.trafficJunction.1.sdhc");
|
|
|
|
|
foreach (var binding in _bindings)
|
|
|
|
|
{
|
|
|
|
|
await BindQueueAsync(_channel, binding.Exchange, binding.ExchangeType, binding.RoutingKey);
|
|
|
|
|