Valid JSON rejected by RabbitMQ input


When pulling messages from RabbitMQ, if the message payload is a JSON string, the RabbitMQ plugin attempts to parse it regardless of the setting for codec. This is fine; however, a valid JSON string that consists of an array will cause the plugin to crash.

Examples of JSON input we used for testing:

Note that nested arrays work fine, but if the top level object is an array (enclosed by []), rather than an object (enclosed by {}), the plugin will crash.

"Crash" means in this case that the plugin disconnects with a bogus error about converting a string to an integer, and attempts to reconnect. Since the message was not retrieved, it's still in place in the RabbitMQ queue, and is retrieved again. This causes an "infantile loop"...


Logstash Developers


Steve Keller


Affects versions