RabbitMQ input plugin with empty payload

Hello,

I am wondering if other users are experiencing the same issue. I have a rabbitmq server with the event exchange plugin enabled. I would like to use logstash to consume the messages:

The configuration is straightforward

input {
    rabbitmq {
        host => "localhost"
        exchange => "amq.rabbitmq.event"
        key => "user.created"
        queue => "audit-events"
        user => "xxx"
        metadata_enabled => "true"
        password => "xxx"
    }

}

output {
      stdout {}
    }

Although I can see messages going in the exchange and logstash creating a binding/consumer and ACKing the messages, the message don't appear in the output. I tried various debug flags but no luck. I wrote a custom consumer and I saw that for this particular use case the payload of the message is empty. The data I want are in the headers of the message. I have a feeling that logstash rabbitmq plugin will ignore messages with an empty payload because when I try and push a message I with a non empty payload, I can see ending up in stdout.

Has any of you seen anything similar. Not sure if that is a bug or is normal.

Thanks,
Efstathios X

If I am reading it correctly then the code will convert an empty payload into an array containing zero events, so nothing will get flushed to the pipeline. I think this is working as expected.

Thanks Badger, I was expecting by having metadata_enabled => true to at least get the metadata.headers that I wanted but looks like it doesn't work.

Cheers

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.