Refactor configuration to be more compact
svetob opened this issue · 2 comments
svetob commented
We want to be able to specify hundreds of queues and exchanges and still keep the configuration readable. To do this the configuration format needs a bit of refactoring.
Current issues:
- Must specify vhost for each exchange/queue/binding
- Must specify required defaults for exchanges and bindings
Suggestions are defaults as mentioned in issue #4 and also to group exchanges/queues per vhost.
rasjoh commented
users:
admin:
admin: true
password: ADM1N
vhosts:
bite:
tracing: true
permissions:
admin@bite:
configure: .*
write: .*
read: .*
exchanges:
bite:
defaults:
type: topic
durable: true
auto_delete: false
internal: false
com.meltwater.throttle.enrichment.social: {}
com.meltwater.throttle.enrichment.social.deadletter: {}
com.meltwater.enrichment.social@bite: {}
com.meltwater.enrichment.social.deadletter: {}
queues:
bite:
defaults:
durable: true
auto_delete: false
arguments:
x-message-ttl: 10000
to-throttle-enrichment-social: {}
to-throttle-enrichment-social-deadletter: {}
to-pipeline-social: {}
to-pipeline-social-deadletter: {}
bindings:
bite:
defaults:
destination_type: queue
routing_key: "#"
com.meltwater.throttle.enrichment.social@to-throttle-enrichment-social: {}
com.meltwater.throttle.enrichment.social.deadletter@to-throttle-enrichment-social-deadletter: {}
com.meltwater.enrichment.social@to-pipeline-social: {}
com.meltwater.enrichment.social.deadletter@to-pipeline-social-deadletter: {}
svetob commented
That looks good and more compact.
We should take a good look at where to put the defaults.
Bindings should have YAML dividers : instead of @ for consistency. (@ is a horrible syntax anyway...)
So a binding is bindings:{vhost}:{exchange}:{target}: