What are the drawbacks of using the Chain of Responsibility pattern?

The Chain of Responsibility pattern has several drawbacks that show up as chains grow longer or less disciplined. Because a request travels through handlers sequentially until one accepts it, the pattern trades explicit control flow for flexibility, which introduces performance, debugging, and reliability costs.

Key Points

public class ChainDrawbacks {

    static abstract class Handler {
        Handler next;
        Handler setNext(Handler n) { next = n; return n; }
        void handle(String request) {
            if (next != null) next.handle(request);
            // Drawback 1: if no handler matches, the request silently disappears
        }
    }

    static class JsonHandler extends Handler {
        @Override void handle(String r) {
            if (r.startsWith("{")) System.out.println("JSON handled");
            else super.handle(r);
        }
    }

    static class XmlHandler extends Handler {
        @Override void handle(String r) {
            if (r.startsWith("<")) System.out.println("XML handled");
            else super.handle(r);
        }
    }

    public static void main(String[] args) {
        Handler chain = new JsonHandler();
        chain.setNext(new XmlHandler());

        chain.handle("<order/>");
        chain.handle("name=asha");   // prints nothing at all
        System.out.println("CSV request was not handled and no error was raised");

        // Drawback 2: order matters; if a catch-all handler came first,
        // the specific handlers after it would never run.
    }
}

Output

XML handled

CSV request was not handled and no error was raised

Interview Tip

A concise interview answer is

The main downsides are performance, since a request may pass through several handlers before it's handled, and debuggability, since it's not obvious which handler will act. There's also a real risk of a request falling through the whole chain unhandled unless you add a default handler, and chain ordering is easy to misconfigure.

Last updated: 1 November 2026

Previous question: How does the Chain of Responsibility pattern promote loose coupling?

Next question: What is the Observer pattern and when would you use it?

More Java Design Patterns interview questions

All Java Design Patterns questions