openzipkin/zipkin · error · IllegalArgumentException
concurrency < 1
Error message
concurrency < 1
What it means
ActiveMQCollector.Builder.concurrency(int) requires at least 1 concurrent message listener; 0 or negative values throw IllegalArgumentException. Concurrency controls how many JMS MessageListeners process spans from the queue in parallel.
Source
Thrown at zipkin-collector/activemq/src/main/java/zipkin2/collector/activemq/ActiveMQCollector.java:64
return this;
}
public Builder connectionFactory(ActiveMQConnectionFactory connectionFactory) {
if (connectionFactory == null) throw new NullPointerException("connectionFactory == null");
this.connectionFactory = connectionFactory;
return this;
}
/** Queue zipkin spans will be consumed from. Defaults to "zipkin". */
public Builder queue(String queue) {
if (queue == null) throw new NullPointerException("queue == null");
this.queue = queue;
return this;
}
/** Count of concurrent message listeners on the queue. Defaults to 1 */
public Builder concurrency(int concurrency) {
if (concurrency < 1) throw new IllegalArgumentException("concurrency < 1");
this.concurrency = concurrency;
return this;
}
@Override public ActiveMQCollector build() {
if (connectionFactory == null) throw new NullPointerException("connectionFactory == null");
return new ActiveMQCollector(this);
}
}
final String queue;
final LazyInit lazyInit;
ActiveMQCollector(Builder builder) {
this.queue = builder.queue;
this.lazyInit = new LazyInit(builder);
}
View on GitHub (pinned to 878ce2a1fa)
Solutions
- Set concurrency to 1 or higher; 1 is the default and is fine for low volume.
- Validate/normalize parsed config before the builder: if (c < 1) c = 1 or fail with a clear config error.
- Check the raw property value (empty string, whitespace, wrong key) if it parses to 0.
Example fix
// before
int c = Integer.parseInt(props.getProperty("concurrency", "0"));
builder.concurrency(c); // throws 'concurrency < 1'
// after
int c = Integer.parseInt(props.getProperty("concurrency", "1"));
builder.concurrency(Math.max(1, c)); Defensive patterns
Strategy: validation
Validate before calling
java
int c = Integer.parseInt(props.getProperty("concurrency", "1"));
if (c < 1) throw new IllegalArgumentException("concurrency must be >= 1: " + c);
builder.concurrency(c); Prevention
- Normalize parsed numeric config to sane minimums before passing to builders.
- Use non-zero defaults in property loaders.
When it happens
Trigger: Calling .concurrency(0) or a negative number — commonly a parsed config value (ACTIVEMQ_CONCURRENCY) that defaulted to 0 or was misparsed (e.g. empty string parsed as 0).
Common situations: Numeric env property unset and defaulting to 0 in a properties loader; a "disable" flag misused as concurrency; config typos producing non-numeric parses.
Related errors
- metrics == null
- connectionFactory == null
- queue == null
- rate should be between 0 and 1: was {}
- storage == null
AI-assisted analysis of openzipkin/zipkin@878ce2a1fa (2026-08-14).
Data as JSON: /api/errors/6a2f5f1a9116d4a4.
Report an issue: GitHub.