RabbitMQ
RabbitMQ isolation uses routing keys in message headers for selective message consumption, similar to Kafka and Pub/Sub, but adapted for RabbitMQ's queue-based model.
Solution Approach
- Publisher: The Signadot wrapper library extracts routing keys (e.g., from OpenTelemetry baggage) and injects them into RabbitMQ message headers during publishing. This works transparently with existing exchanges and routing patterns.
- Consumer: The wrapper intercepts consume calls, connects to the Signadot Routes API to determine valid routing keys for the sandbox, and filters messages before passing them to business logic. Isolation is achieved by using a separate queue for each sandbox, not by rejecting messages.
Queue Management
The sandboxed consumer always creates its own ephemeral queue in code. The wrapper replicates bindings from the baseline queue so the sandbox queue receives the same message types. The queue is automatically cleaned up when the sandboxed consumer shuts down.
Summary
- Use routing keys in headers for message-level isolation.
- Signadot wrappers automate queue creation and message filtering.
- Each sandboxed consumer creates and manages its own ephemeral queue in code.