MeltwaterArchive/rabbit-puppy

Allow specifying defaults

svetob opened this issue · 1 comments

To make the configuration more compact and easier to read, we should allow specifying defaults for queues, exchanges and bindings. Preferably, per vhost.

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