- Home
- Skills
- APIs & Backend
- Spring Boot Resilient Integrations
Spring Boot Resilient Integrations
Hardens Spring Boot HTTP clients with timeouts, retries, circuit breakers, and fault-injection tests.
$8
Works with the AI Agents you already use
Spring Boot Resilient Integrations
Example session with this skill installed
Our service calls an external pricing API by SKU and it keeps hanging our threads when the provider is slow. Make the client resilient: timeouts, sensible retries, a circuit breaker, and tests that prove it behaves under failure.
- Read your context and instructions
- Compiled the spring boot resilient
Summary. The pricing client now has explicit timeouts, bounded retries for transient failures only, a circuit breaker and a concurrency limit. The full build passed twice in a row:
31 tests, 0 failures, 0 errors. The skill's request-count test also found a real defect: the default JDK HTTP client silently retried GET requests on its own, so a connection reset produced 6 upstream requests instead of 3. The client was moved to Apache HttpClient 5 with its automatic retries turned off.
| Decision | Choice | Why |
|---|---|---|
| Retry | The framework's own RetryTemplate, with exponential backoff, jitter and a total-time bound | Already on the classpath; no extra library needed |
| Concurrency limit | The framework's @ConcurrencyLimit in reject mode | Built in; fails fast instead of queueing |
| Circuit breaker | Resilience4j circuit breaker (the one added dependency) | The framework has none; it has a small dependency footprint |
| HTTP client | Apache HttpClient 5, automatic retries off | The JDK client retries on its own and has no way to turn that off |
| Latency budget | Worst case 4.85 s, against an assumed 5 s caller timeout | Checked at startup |
Verified by tests against a mock server running in a container:
- 502/503/504 followed by a 200 makes 2 requests; 400/404/409/429/500 each make 1. A 429 does not count toward the breaker;
Retry-Afteris passed on to the caller. - Connection reset or an empty response makes exactly 3 requests; a delay past the read timeout fails within the budget.
- Malformed or wrong-SKU bodies are not retried; redirects are not followed.
- The breaker opens and then sends nothing; after recovery the next call returns real data.
- When the concurrency limit is full, calls are rejected in under 300 ms without reaching the upstream.
- A write during an outage returns 503 +
Retry-Afterand stores nothing. - No connection sits idle in a transaction during a slow call; pooled connections carry statement and lock timeouts.
- Liveness and readiness stay UP while the breaker is open; error bodies are problem details with no internals.
Next steps. Replace the assumed 5 s caller timeout with your real one and re-check the budget, add the pool-acquisition timeout to the worst-case latency figure, and expose the in-flight call gauge on your dashboards.
Connects securely to your tools. The creator never sees your data.
About this skill
Integration code can pass the happy-path test and still break when the upstream misbehaves. Typical defects are HTTP clients without timeouts, retries on calls that must not be repeated, circuit breakers that count client errors, and upstream error bodies leaked to users.
This skill gives Claude Code, Cursor, Codex CLI and other SKILL.md-compatible agents a version-agnostic workflow for every outbound call. Before writing code, the agent reads the build file and records the actual framework and library versions. It prefers capabilities the framework and project already provide and confirms every API and property for those versions. Then it fills a dependency inventory, decides timeouts, retry, circuit breaker and concurrency limit per dependency, implements them in a fixed order, and translates failures once into typed exceptions and 503 problem-details responses with Retry-After.
The guidance is written as principles, decision rules and checklists rather than version-specific snippets. It covers connect and read timeouts within a latency budget, retrying only transient failures, explicit recorded and ignored failure sets for the breaker, bulkheads, failing closed on writes, metrics with bounded tags, and keeping remote calls out of database transactions. A fault-injection test matrix against a networked mock HTTP server 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.
Limited to Spring Boot/JVM environments. Requires manual confirmation of API properties if not found in dependency cache. Verification needs a networked mock server.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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 projectMavenorGradle
Docker (for Testcontainers)
- Optional
- Resilience4j (only if the framework lacks a circuit breaker)
Integration tests use Testcontainers, so Docker must be running. On Windows, use Docker Desktop.
Permissions
File Scopes
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.