apache/shenyu · error · IllegalArgumentException
The current provider is not of orderly type. Please use…
Error message
The current provider is not of orderly type. Please use onData() method.
What it means
DisruptorProvider.onOrderlyData() publishes data with an ordering hash so entries with the same hash are consumed sequentially. It is only valid on providers created with orderly=true; otherwise this IllegalArgumentException is thrown and the caller should use onData().
Solutions
- Switch the call site to onData(data)
- If ordering is required, recreate the provider as orderly (ofOrderly(true) / correct DisruptorProviderManage configuration)
- Audit all publish call sites of the provider to match its configured mode
Example fix
// before provider.onOrderlyData(data, "key"); // after provider.onData(data);
Defensive patterns
Strategy: type-guard
Validate before calling
// guard before publishing
if (provider.isOrderly()) {
provider.onOrderlyData(data, hashKey);
} else {
provider.onData(data);
} Type guard
boolean canUseOrderly = provider.isOrderly();
Try / catch
try {
provider.onOrderlyData(data, hashKey);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("not of orderly type")) {
provider.onData(data);
} else {
throw e;
}
} Prevention
- Match provider construction (ofOrderly) with every publish call site
- Document required ordering per disruptor pipeline in the module README
- Add tests that exercise the publish path of each provider configuration
When it happens
Trigger: Calling onOrderlyData(data, hashArray) on a provider whose isOrderly flag is false (default, unordered creation).
Common situations: Copying orderly publish code into a module that created its provider with DisruptorProvider.ofType(..., false) or the default unordered constructor; refactoring that flipped a provider to unordered but left orderly call sites.
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
- The current provider is of orderly type. Please use…
- @ShenyuClient please use it on the interface.
- extension clazz (clazz) is not interface!
AI-assisted analysis of apache/shenyu@567142e072 (2026-09-12).
Data as JSON: /api/errors/09bbee476078eae1.
Report an issue: GitHub.
Appendix: source
Thrown at shenyu-disruptor/src/main/java/org/apache/shenyu/disruptor/provider/DisruptorProvider.java:101
if (isOrderly) {
throw new IllegalArgumentException("The current provider is of orderly type. Please use onOrderlyData() method.");
}
try {
ringBuffer.publishEvent(translatorOneArg, data);
} catch (Exception ex) {
logger.error("ex", ex);
}
}
/**
* On orderly data.
*
* @param data the data
* @param hashArray the hashArray.
*/
public void onOrderlyData(final T data, final String... hashArray) {
if (!this.isOrderly) {
throw new IllegalArgumentException("The current provider is not of orderly type. Please use onData() method.");
}
try {
String hash = String.join(":", hashArray);
ringBuffer.publishEvent(orderlyArg, data, hash);
} catch (Exception ex) {
logger.error("ex", ex);
}
}
/**
* Shutdown.
*/
public void shutdown() {
if (Objects.nonNull(disruptor)) {
disruptor.shutdown();
}
if (Objects.nonNull(executor)) {
executor.shutdown();View on GitHub (pinned to 567142e072)