Trigger icon
Schedule icon
Consume icon
Return icon
Switch icon
Produce icon
Log icon
SlackIncomingWebhook icon

Solace Dead-Letter Message Triage & Safe Replay Gate

Triage Solace PubSub+ dead-letter queue backlogs, safely re-publish recoverable messages, and isolate poison pills with Kestra.

Categories
DataInfrastructure

Enterprise event meshes running on Solace PubSub+ rely on Dead Letter Queues (DLQs) to capture unprocessable or rejected events. When transient failures like microservice restarts or temporary database lockups occur, messages can safely be replayed. However, blindly replaying an entire DLQ risks unleashing toxic poison pills that crash downstream consumers repeatedly in an infinite retry storm.

This blueprint implements an automated Dead-Letter Triage and Safe Replay Gate. It bounds DLQ draining into manageable batches, classifies the volume against a configurable safety ceiling, safely re-publishes recoverable messages back to active ingress topics with persistent delivery guarantees, and automatically isolates catastrophic surges into an offline quarantine topic while paging on-call responders.

How it works

  1. solace_dlq_event_trigger (io.kestra.plugin.solace.Trigger) polls the specified Solace dead-letter queue for pending messages, initiating event-driven remediation. A secondary schedule (dlq_triage_schedule_backup) acts as a time-based backstop.
  2. consume_dead_letter_batch (io.kestra.plugin.solace.Consume) connects over the native Solace SMF protocol, draining up to max_batch_size JSON messages from the DLQ into internal Kestra storage (.ion serialized records).
  3. classify_batch_status (io.kestra.plugin.core.debug.Return) evaluates the drained message count against backlog_quarantine_ceiling. It resolves to EMPTY_DLQ if clear, RECOVERABLE_BATCH if within safe replay bounds, EXCESSIVE_POISON_SURGE if volume breaches safety thresholds, or DRAIN_FAILED on communication loss.
  4. route_by_triage_decision (io.kestra.plugin.core.flow.Switch) executes branch-specific operations:
    • RECOVERABLE_BATCH: Invokes replay_messages_to_active_topic (io.kestra.plugin.solace.Produce) to re-publish the batch to target_replay_topic with deliveryMode: PERSISTENT.
    • EXCESSIVE_POISON_SURGE: Halts auto-replay, isolates the batch to quarantine_topic via quarantine_poison_batch (io.kestra.plugin.solace.Produce), and alerts Slack via alert_quarantine_surge (io.kestra.plugin.slack.notifications.SlackIncomingWebhook).
    • EMPTY_DLQ: Logs a clean health confirmation.
    • DRAIN_FAILED: Alerts Slack of broker or queue binding failures.
  5. log_audit_summary (io.kestra.plugin.core.log.Log) writes a persistent audit record documenting execution ID, queue name, message counts, and triage outcome.
  6. The flow-level errors block catches any unexpected orchestration failures and notifies engineering.

What you get

  • Automated, bounded triage of Solace dead-letter queues without manual operator CLI commands.
  • Safe re-publishing of transient failures using native PERSISTENT messaging delivery.
  • Protection against poison-pill cascade storms via configurable safety ceilings.
  • Isolated offline quarantine routing for uncontained backlog spikes.
  • Real-time Slack notifications alerting on-call engineers when intervention is required.
  • Immutable execution logs establishing an audit trail for data compliance.

Who it's for

  • Platform Engineers and SREs administering Solace PubSub+ event brokers and enterprise event meshes.
  • Integration and Backend Architects maintaining high-volume event-driven microservices.
  • Data Operations teams requiring automated dead-letter queue governance and poison-pill containment.

Why orchestrate this with Kestra

Manual dead-letter handling through broker admin UIs is slow, error-prone, and lacks auditable guardrails. Custom consumer scripts often lack state tracking, retry mechanics, and alerting. Orchestrating with Kestra provides declarative topology definitions, native Solace event triggers, secure credential isolation, visual audit trails, and automatic Slack escalation within a single unified workflow.

Prerequisites

  • A running Solace PubSub+ Software Broker or Solace Cloud instance reachable over the SMF messaging port (default 55555).
  • Provisioned Solace queues: a Dead-Letter Queue (e.g., orders.dlq) and corresponding target topics (orders/incoming/replayed, orders/quarantine/poison).
  • Solace client credentials with consume and publish permissions on the configured Message VPN.
  • A Slack incoming webhook URL for incident alerts.

Secrets

  • SOLACE_USERNAME: Username for authenticating with the Solace Message VPN.
  • SOLACE_PASSWORD: Password for the Solace client username.
  • SLACK_WEBHOOK_URL: Slack incoming webhook URL used for incident notifications and unhandled error alerts.

Quick start

  1. Configure SOLACE_USERNAME, SOLACE_PASSWORD, and SLACK_WEBHOOK_URL in your Kestra namespace secrets.
  2. Start a local Solace broker for testing using the official Docker image: docker run -d -p 8080:8080 -p 55555:55555 --shm-size=1g --name=solace solace/solace-pubsub-standard:latest
  3. Ensure inputs.dlq_name matches your broker's dead-letter queue.
  4. Execute the flow manually to verify connectivity and audit logging.
  5. Enable triggers.solace_dlq_event_trigger to activate continuous automated triage.

How to extend

  • Add payload header inspection using a script task to filter messages based on HTTP error codes (e.g., replaying 503 Service Unavailable while permanently quarantining 400 Bad Request).
  • Route quarantined message metadata to an S3 or Google Cloud Storage bucket for long-term compliance archiving.
  • Connect downstream ServiceNow or Jira tasks to automatically generate incident tickets during EXCESSIVE_POISON_SURGE events.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.