Skip to main content

HTTP Connection Interceptors

HTTP interceptors operate over a request–response model instead of persistent connections. When a message is intercepted, it is packaged into an HTTP request and sent to a configured endpoint for processing. The external service (microservice, third-party API, or custom backend) handles the message and responds accordingly.

Unlike real-time interceptors, HTTP interceptors do not rely on a continuous WebSocket/SSE connection. Instead, they use stateless communication, making them suitable for scenarios where persistent connections are not required or where integration with external systems is needed.

This model is especially useful for batch processing, external API integration, fraud detection, or compliance checks, where processing may take longer and does not need to block the real-time message flow.

How It Works

HTTP interceptors use a stateless request–response pattern, forwarding intercepted messages to an external HTTP endpoint for processing.

  1. Message Capture: When a message enters the channel, the interceptor is triggered.
  2. Request Preparation: The system builds an HTTP request using the configured endpoint URL, headers, and body template, filling placeholders with message data.
  3. External Processing: The request is sent to the configured service or API, where custom logic is executed (validation, enrichment, fraud detection, etc.).
  4. Response Handling:
  • Synchronous mode: The pipeline waits for the HTTP response before continuing.
  • Asynchronous mode: The pipeline continues immediately, while the HTTP request runs in the background.
  1. Forwarding: Processed results (if returned) are passed back into the pipeline; otherwise, the original message continues unaffected.