fluent-plugin-rabbitmq icon indicating copy to clipboard operation
fluent-plugin-rabbitmq copied to clipboard

When used as output the queue isn't automatically created

Open buttilda opened this issue 6 years ago • 2 comments

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>

buttilda avatar Jan 11 '19 16:01 buttilda

Please bind queues to the exchange to subscribe events. out_rabbitmq.rb create exchanges automatically, but it doesn't create queues.

mmasaki avatar Jan 21 '19 07:01 mmasaki

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.

nhlushak avatar Jan 21 '20 14:01 nhlushak