Spring Boot reliable messaging

    1

    Teach your coding agent to build consumers and publishers that survive redelivery, poison messages and broker outages.

    $8

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Spring Boot reliable messaging

    Example session with this skill installed

    When we save a ticket we also publish an event to RabbitMQ, but sometimes the event is lost, and a bad message makes our consumer retry forever. Make publishing and consuming reliable and test it against a real broker.

    • Read your context and instructions
    • Compiled the spring boot reliable

    Summary. Events now go through a transactional outbox, with a relay that publishes them using publisher confirms. The consumer is idempotent, dead-letters poison messages, and retries only transient failures. The full build passed twice in a row:

    24 tests, 0 failures, 0 errors, against PostgreSQL and RabbitMQ in containers. No dependencies were added. Consumer retry uses the framework's own retry policy.

    ConcernDecision
    Lost eventsOutbox row written in the same transaction as the state change; the writer refuses to run outside a transaction
    RelayBounded batches claimed with FOR UPDATE SKIP LOCKED; publisher confirms with correlation, the mandatory flag and returned-message detection
    Poison messagesRaw-bytes listener, rejected without requeue, then the dead-letter queue after one attempt
    Transient failuresBounded retry (a lock timeout is retried 3 times, then dead-lettered)
    Duplicates and reorderingProcessed-message record plus a version guard on the read model

    Verified by tests:

    • Topology read from the broker: durable, bounded and dead-lettered queues, with a consumer attached.
    • End to end: HTTP → outbox → relay → broker → consumer updates the read model.
    • Seven poison variants are dead-lettered after exactly one attempt: unreadable, wrong content type, quoted JSON string, unknown type, unsupported schema, ID mismatch, missing event ID.
    • A real row-lock timeout is retried 3 times, then dead-lettered, and the processed record is rolled back.
    • A duplicate message ID gives one effect; stale and out-of-order events change nothing.
    • Two parallel relays publish each row once; an unroutable message stays pending with its attempts counted.
    • With the broker paused, rows stay pending, the oldest-pending age is reported and probes stay UP; publishing recovers afterwards.
    • Rows at the attempt cap are reported as stuck; cleanup deletes only rows past retention.

    Next steps. If order on the broker matters, publish each batch on one channel (the test run needed this). Choose an overflow behaviour for the dead-letter queue so it never drops messages silently. Alert on dead-letter depth and oldest-pending age.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Message-driven code fails quietly. A consumer that assumes exactly-once delivery applies an effect twice, a poison message blocks a queue or loops forever, an event is published before its transaction commits, or a message is lost when the broker is briefly unavailable.

    This skill gives Claude Code, Cursor, Codex CLI and other SKILL.md-compatible agents a version-agnostic workflow for producers and consumers. Before writing code, the agent reads the build file and records the actual framework and broker-client versions. It checks what the configured message converter does and confirms every API for those versions. Then it assesses each consumer and producer and applies a fixed set of rules.

    The guidance covers durable, bounded queues with one dead-letter queue per consumer, and a message envelope with event ID, schema version and aggregate version. Messages are serialized exactly once, and consumers validate raw bytes in their own code. Retries are bounded, invalid messages go straight to the dead-letter queue, a processed-message table in the same transaction makes consumers idempotent, and version guards ignore stale events. The transactional outbox claims rows skip-locked, sends a batch and awaits all acknowledgements with one deadline, and treats unroutable messages as failures. A test plan against a real broker shows how to prove each behaviour.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Requires a relational database for outbox/idempotency tables. Not for reactive WebFlux. Requires manual setup of Testcontainers for the verification suite.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 days ago

    Software
    Spring Boot project
    Maven
    orGradle
    Message broker (RabbitMQ)Relational databaseDocker (for Testcontainers)

    Integration tests use Testcontainers, so Docker must be running. On Windows, use Docker Desktop.

    Permissions

    Read Files
    Terminal / Shell
    Write Files

    File Scopes

    src/**
    pom.xml
    build.gradle*

    Reads build files and source code to detect versions and assess the existing code, writes code and tests in the project, and runs the build and tests from the terminal. The build tool and Testcontainers may download dependencies and container images. No external accounts, API keys or credentials are needed.

    Listed2 days ago

    What's inside

    Frequently Asked Questions

    This skill automates the implementation of the Transactional Outbox and Idempotent Consumer patterns, preventing common distributed system failures like lost events, duplicate processing, and database-broker inconsistency.

    The skill requires Spring Boot, a relational database supporting 'skip-locked' (such as PostgreSQL 9.5+ or MySQL 8.0+), and RabbitMQ as the message broker.

    You receive version-neutral implementation skeletons for outbox relays, idempotent listeners, resilient queue configurations, and a comprehensive verification checklist for testing broker outages.

    No, this skill is specifically optimized for standard imperative Spring Boot applications; it does not currently support non-transactional stores or reactive streams like Spring WebFlux.

    The skill performs an environment detection step to read your build files and resolve your specific Spring and persistence versions before generating any code to ensure compatibility.

    Unlike generic AI prompts, this skill enforces strict safety protocols like raw byte parsing to avoid deserialization vulnerabilities and implements SQLState-aware retry logic that standard assistants miss.

    New in APIs & Backend