OpenFeign/feign · error · UnsupportedOperationException
Streaming Decoding is not supported.
Error message
Streaming Decoding is not supported.
What it means
The reactive Feign builder overrides doNotCloseAfterDecode() to throw UnsupportedOperationException, because streaming (keep-alive after decode) semantics conflict with the reactive model where the publisher itself controls consumption and connection release. Calling this builder option on the reactive builder always fails immediately.
Solutions
- Remove the doNotCloseAfterDecode() call from the reactive builder configuration
- Obtain streaming behavior through the reactive publisher itself (e.g. Flux<T> with backpressure) instead
- If streaming decode is truly required, use the non-reactive Feign builder that supports it
Example fix
// before ReactorFeign.builder().doNotCloseAfterDecode().target(Api.class, url); // after ReactorFeign.builder().target(Api.class, url);
Defensive patterns
Strategy: type-guard
Type guard
if (builder instanceof feign.reactive.ReactiveFeign.Builder) {
// do not call doNotCloseAfterDecode()
} Prevention
- Keep reactive builder configuration minimal; don't copy streaming options from non-reactive builders
- Centralize builder setup per module so incompatible options never mix
When it happens
Trigger: Calling builder.doNotCloseAfterDecode() on ReactiveFeign.Builder / ReactorFeign.Builder / RxJavaFeign.Builder while configuring the client.
Common situations: Porting configuration code from a streaming-capable Feign builder to the reactive builder; enabling streaming decode globally in shared builder utility code.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Invocation Handler Factory overrides are not supported.
- Invocation Handler Factory overrides are not supported.
- Empty targets don't have URLs
- at least one decoder is required
- at least one encoder is required
AI-assisted analysis of OpenFeign/feign@e2a1e27560 (2026-09-10).
Data as JSON: /api/errors/41af5d4bcd47ae92.
Report an issue: GitHub.
Appendix: source
Thrown at reactive/src/main/java/feign/reactive/ReactiveFeign.java:57
/**
* Build the Feign instance.
*
* @return a new Feign Instance.
*/
@Override
public Feign internalBuild() {
if (!(this.contract instanceof ReactiveDelegatingContract)) {
super.contract(new ReactiveDelegatingContract(this.contract));
} else {
super.contract(this.contract);
}
return super.internalBuild();
}
@Override
public Feign.Builder doNotCloseAfterDecode() {
throw new UnsupportedOperationException("Streaming Decoding is not supported.");
}
}
}
View on GitHub (pinned to e2a1e27560)