Why should Logstash as a producer be responsible for creating queues?
Because if your producers are started before your consumers then you would loose data since the consumers haven't created the queue yet to which data will arrive?
The last thing you'd want to do is to coordinate whoever is allowed to connect first to RabbitMQ ... The idea of AMQP is that producers and consumers aren't aware of each other.
It's not that a producer is responsible "per se" for creating queues. If you let both producing and consuming parties create the exchange, queue and queue binding then no data gets lost.
If the consumer is first to connect and create the exchange/queue/binding great, then all is ready for the producer to start dumping data into RabbitMQ.
If the producer is first to connect and create the exchange/queue/binding, then it can already start to produce data, which ends up in the created queue from which the consumer then can start to consume when its started and connected. No data lost.
If you submit data into an exchange to which no queue is bound then you loose data.
The precondition is that the consumer and producer create the exchange/queue/binding with exactly the same properties. Otherwise both parties have different expectations which is not good. RabbitMQ will then refuse the deviating exchange/queue/binding from being created with error "precondition failed".
This is how AMQP clients (producers and consumers) should behave.
The last thing you'd want to do is to coordinate whoever is allowed to connect first to RabbitMQ ... The idea of AMQP is that producers and consumers aren't aware of each other.
And yet producers are expected to know about all consumers and how their queues should be configured?
Anyway, feel free to file a feature request on GitHub. Requests made here aren't likely to be picked up.
And yet producers are expected to know about all consumers and how their queues should be configured?
No? Producers and consumers don't care how many are participating, where they're all connecting from, behind nat or not, how many are joining, leaving, ...
What needs to be agreed upon beforehand are the properties of how data is handled. Durable, TTL, acknowledgements, ... both the producer configuration and consumer configuration should be aligned for that.
Anyway, feel free to file a feature request on GitHub. Requests made here aren't likely to be picked up.
yeah did that first but I followed the suggestion made when creating a new issue:
Please post all product and debugging questions on our [forum](https://discuss.elastic.co/c/logstash). Your questions will reach our wider community members there, and if we confirm that there is a bug, then we can open a new issue here
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.