conduitio-labs / conduit-connector-rabbitmq

Conduit connector for RabbitMQ
0 stars 0 forks source link

Enhancement of Exchange and Queue Binding Validation #14

Closed alarbada closed 8 months ago

alarbada commented 9 months ago

The connector configures queue binding with an exchange name but may not validate the coherency and correctness of these configurations.

Example of a missing check:

if d.config.ExchangeName != "" && (d.config.ExchangeType == "" || d.config.RoutingKey == "") {
    return fmt.Errorf("exchange type and routing key must be provided when exchange name is set")
}
alarbada commented 8 months ago

It is a bit more complex than I thought. For example, if the exchange type is "fanout", you don't really need to set a routing key.

This is a nice to have, as proper configuration parsing is something I appreciate a lot as a developer and consumer of other people's tools.

For now, however, I won't put more validations like this, as I want the connector to stay flexible, and I'll assume the person that configures the connector knows what he is doing.