protected void SetupEndpoint(string virtualHost, string queueName, string exchangeName) { if (!string.IsNullOrWhiteSpace(exchangeName)) { Exchange = new ExchangeConfiguration() { Name = exchangeName, Type = RabbitMQUtil.ExchangeType.Fanout }; } QueueEndpoint = new QueueEndpoint() { VirtualHost = virtualHost, RoutingKey = queueName, Exchange = Exchange }; }
protected void SetupExchange(string name) { if (!string.IsNullOrWhiteSpace(name)) { Exchange = new ExchangeConfiguration() { Name = name, Durable = true }; } }