corvus-ch / rabbitmq-cli-consumer

Consume RabbitMQ messages into any cli program
MIT License
236 stars 36 forks source link

Disable create queue if not exists by configuration #36

Closed miranovy closed 6 years ago

miranovy commented 6 years ago

It is possible to add configuration parameter for disable automatically create queue if not exists? Thanks a lot.

corvus-ch commented 6 years ago

No, there is no such parameter or configuration available. @miranovy can you please describe your use case as I have the feeling that ther is a feature request hidden in your question.

miranovy commented 6 years ago

We have two separate systems. One produce messages to rabbitmq, second consume them. For consumers we used rabbitmq-cli-consumer. We want to create a queue just from froducees (from one place). Therefore, we would need to disable creating queues from rabbit-cli-consumer by configuration.

Define two status by configuration:

  1. auto setup was enabled (default option, current state)
    • queue not exists, rubbitmq-cli-cosumer create it
  2. auto setup was disabled (by configuration value)
    • queue not exists, rubbitmq-cli-cosumer write error and exit

Simply put, suppress calling the setup method in consumer.go by configuration parameter it is possible.

Thank you very much

corvus-ch commented 6 years ago

@miranovy A new release is available containing this feature (https://github.com/corvus-ch/rabbitmq-cli-consumer/releases/tag/2.3.0).

miranovy commented 6 years ago

Thank you very much, it works great!