Federation

Forward Messages Between Brokers

Declaring Backends (statically) by Environment Variables

PROTOCOL_SINGLENAME_PROPERTY=value

Declaring a static AMQP Backend

AMQP_MYORIGIN_HOST=localhost
AMQP_MYORIGIN_PORT=5672
AMQP_MYORIGIN_VHOST=/
AMQP_MYORIGIN_USER=guest
AMQP_MYORIGIN_PASS=guest

Declaring a static SNS Backend

SNS_MYTARGET_REGION=us-east-1

When we define only the region, federation uses the current AWS IAM Role or the configured credentials in ~/.aws/credentials. It’s possible to define AWS Keys to override this behavior

SNS_MYTARGET_AWS_ACCESS_KEY_ID=XXXXXXXXXXX
SNS_MYTARGET_AWS_SECRET_ACCESS_KEY=ZZZZZZZZZZZZZZZZZZZZZZ

Declaring Federations

This declaration pushes all messages from the topic (MYORIGIN) helloworld towards the topic at (MYTARGET) helloworld

FEDERATION_HELLO_WORLD=MYTARGET_helloworld,MYORIGIN_helloworld

How it works

With this first version, we only allowed mapping from AMQP (RabbitMQ) clients to SNS brokers. For each federation mapping we create a new AMQP queue with the suffix federation that consumes the messages (with an exchange of the same name) then forward them to the target.

Next releases

  • We plan to allow mappings in both directions AMQP->SNS and SNS->AMQP, as well as the support of new protocols (eg.: Kafka, Redis, etc)
  • A web interface and API with the immutable static method and the dynamic ones we could create in real-time (stored in a database)

GitHub

View Github