fluent-plugin-rabbitmq
fluent-plugin-rabbitmq copied to clipboard
When used as output the queue isn't automatically created
When using this plugin from within Docker it seems that the queue isn't automatically created when the service first runs.
If I manually create the queue and then start Fluentd everything works. If I don't, the service starts and no erros are shown, but since the queue isn't created, no messages are posted and end up lost forever.
Am I doing something wrong?
I'm using the following Dockerfile:
FROM fluent/fluentd:v0.12-onbuild
RUN apk add --update --virtual .build-deps sudo build-base ruby-dev \
&& sudo gem install fluent-plugin-rabbitmq \
&& sudo gem sources --clear-all \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* /home/fluent/.gem/ruby/2.5.0/cache/*.gem
And the following config file:
<source>
@type forward
port 24224
bind 0.0.0.0
</source>
<match **>
@type rabbitmq
host 192.168.0.70
user guest
pass guest
vhost /
format json
exchange something
exchange_type direct
exchange_durable true
routing_key something.something
heartbeat 10
</match>
Please bind queues to the exchange to subscribe events. out_rabbitmq.rb create exchanges automatically, but it doesn't create queues.
Is it possible to implement queues creation in out_rabbitmq
?
Same call for input_rabbitmq
, it creates a queue, but does not create an exchange.