Vinculando a fila ao exchange

Até então a fila de processamento não era especificada, ficando a cargo do RabbitMQ a escolha da mesma. Agora forçamos a fila que deve ser utilizada. Isso permite configurar diferentes filas para diferentes fins.
production 0.2.1
José Neto 2 years ago
parent 4e876045da
commit 834c8bc178

@ -47,6 +47,10 @@ class RabbitMQHandler extends AbstractProcessingHandler
$this->exchange = $exchange;
$this->routingKey = $routingKey;
$this->channel->exchange_declare($exchange, 'direct', false, true, false);
$queueName = config('logging.channels.rabbitmq.queue', 'logstash_queue');
$this->channel->queue_declare($queueName, false, true, false, false);
$this->channel->queue_bind($queueName, $this->exchange, $this->routingKey);
}
/**

Loading…
Cancel
Save