How can I specify exchange type for source?
Closed this issue · 2 comments
I would like to use this plugin as source of fluentd, but I have no idea on how to specify the exchange type for it and also, the what is the default exchange type for obtaining event from RabbitMQ.
I currently do not use this, so I do not remember much...
any idea ? @warmfusion
Hi @ckdanny,
Looking at the README.md on the project it looks like we documented the matcher
plugin with that information, but not the source.
Below is a working example (Based on one of our servers) of using the fluent source plugin, to read data out of RabbitMQ and into fluentd for processing.
You can see below that we've set the exchange_type
to fanout
which means any event published to the fluent.fanout
exchange will be sent to my named queue fluent.events
.
<source>
tag_key true
queue fluent.events
exchange fluent.fanout
exchange_type fanout
bind_exchange true
hosts ["rmqred", "rmqblue", "rmqgreen", "rmqorange", "rmqmagenta"]
vhost fluent
user fluent.reader
pass would_go_here
port 5671
tls true
tls_cert /etc/fluent/ssl/fluent.crt.pem
tls_key /etc/fluent/ssl/fluent.key.pem
tls_verify_peer false
format json
@type amqp
</source>
Other supported exchange_type
options are; direct
,header
and topic
.