The exchange and routing_key in RabbitMQ producer can be configured as template values.
For example, to extract the routing key from the payload, we could set "routing_key" to "${payload.akey}".
Note, the templated exchange and routing_key are restricted in batch mode: We always assume that the value of them is the same for every message in a batch.