Netflix/Hystrix ? reverse-engineered prompt

Reverse engineered prompt

Build me a Java library that helps apps stay reliable when they call slow or broken remote services. I want developers to wrap risky code in a command object, run it normally, queue it for later, or observe it asynchronously, and get a safe fallback when something fails or takes too long.

It should prevent one bad dependency from bringing down the whole app. Add circuit breaker behavior, separate execution pools or simple semaphore style limits, fast failure, graceful recovery, request caching, and batching for repeated calls. Also include basic real time metrics so people can see success, failure, timing, error percentages, and when fallbacks are being used.

Please include clear examples and a small demo that simulates user, payment, order, and credit card calls with some failures and slow responses. Use a normal Java build setup, include tests, and write simple documentation that explains how to use the command pattern and how to run the demo.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab