Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Refactor configuration to be more compact #5

Open
svetob opened this issue Nov 17, 2015 · 2 comments
Open

Refactor configuration to be more compact #5

svetob opened this issue Nov 17, 2015 · 2 comments
Labels

Comments

@svetob
Copy link
Contributor

svetob commented Nov 17, 2015

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
Copy link

rasjoh commented Nov 17, 2015

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
Copy link
Contributor Author

svetob commented Nov 17, 2015

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}:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants