# Simple direct mapping. Messages published to foo are mapped to bar.
# remapping tokens can be done with lt;N> representing token position.
# In this example bar.a.b would be mapped to baz.b.a.
# You can scope mappings to a particular cluster
{ destination: bar.cluster.scoped, weight:100%, cluster: us-west-1 }
# Use weighted mapping for canary testing or A/B testing. Change dynamically
# at any time with a server reload.
{ destination: myservice.request.v1, weight: 90% },
{ destination: myservice.request.v2, weight: 10% }
# A testing example of wildcard mapping balanced across two subjects.
# 20% of the traffic is mapped to a service in QA coded to fail.
{ destination: myservice.test.$1, weight: 80% },
{ destination: myservice.test.fail.$1, weight: 20% }
# A chaos testing trick that introduces 50% artificial message loss of
# messages published to foo.loss
foo.loss.>: [ { destination: foo.loss.>, weight: 50% } ]