Sign inSign up

robertmrk/rabbit_force

By robertmrk

•Updated over 7 years ago

Salesforce Streaming API to RabbitMQ adapter service

Image
0

608

robertmrk/rabbit_force repository overview

⁠rabbit_force

rabbit_force⁠ is a Salesforce Streaming API⁠ to RabbitMQ⁠ adapter service. It listens for event messages from Salesforce's Streaming API⁠ and forwards them to a RabbitMQ broker⁠ for you, so you don't have to.

Streaming API⁠ is useful when you want notifications to be pushed from the server to the client based on criteria that you define with PushTopics⁠ or to receive generic streaming⁠ messages. While RabbitMQ⁠ is one of the most popular options for implementing inter-service communication in a microservice architecture⁠.

While there are lots of great client implementations for RabbitMQ/AMQP for various languages, there are a lot less Streaming API clients, and many of them are badly maintained. Furthermore RabbitMQ offers much more flexible message consumption techniques.

rabbit_force aims to fix these problems, by providing and adapter between the Streaming API and RabbitMQ, so inter-connected services can consume Streaming API event messages with RabbitMQ. It even supports connection with multiple Salesforce orgs, multiple RabbitMQ brokers, and routing messages between them.

⁠Features

  • Forward Streaming API⁠ messages from one or more Salesforce orgs to one or more RabbitMQ brokers⁠
  • Route incoming messages to a specific broker and exchange with the specified routing key and properties, with the help of routing rules defined as JSONPath⁠ expressions
  • Support for Salesforce's replay extension for message reliability and durability⁠ by storing replay markers in a Redis⁠ database
  • Configurable error handling behavior, either fail instantly or try to recover from network and service outages
  • Message sources, sinks and routing configurable with JSON or YAML configuration files
  • Implemented using python asyncio⁠ for efficient handling of IO intensive operations

⁠How to use this image

The image accepts the same command line arguments⁠ as the standalone application. The only mandatory argument is the path to the configuration file.

⁠Start a rabbit_force instance

If the configuration file is located on the host, then you should bind mount its directory into the container and you should specify its path inside the container as a positional argument.

$ docker run -d --name rabbit_force -v /path/to/config:/config:ro robertmrk/rabbit_force:latest /config/config.yaml
⁠Use an embedded configuration file

Alternatively, a simple Dockerfile can be used to generate a new image that includes the necessary configuration.

FROM robertmrk/rabbit_force:latest

COPY config.yaml ./

CMD ["config.yaml"]
$ docker run -d --name rabbit_force configured-rabbit_force

⁠Configuration

To customize the behavior of the application for your use case check out the configuration file reference⁠ and the configuration examples⁠ in the documentation⁠.

⁠License

rabbit_force source code is available under the MIT License⁠.

Tag summary

Content type

Image

Digest

Size

59.1 MB

Last updated

over 7 years ago

docker pull robertmrk/rabbit_force