conductor-oss/conductor · error · IllegalArgumentException
Addresses are undefined
Error message
Addresses are undefined
What it means
Constructor guard on AMQPObservableQueue: the addresses array is null or has length 0. Thrown during construction. Like the factory check, the Builder derives addresses from hosts, so this guard is mostly hit by direct construction with a missing addresses argument.
Source
Thrown at amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java:83
private int pollTimeInMS;
private AMQPConnection amqpConnection;
protected LinkedBlockingQueue<Message> messages = new LinkedBlockingQueue<>();
private volatile boolean running;
public AMQPObservableQueue(
ConnectionFactory factory,
Address[] addresses,
boolean useExchange,
AMQPSettings settings,
AMQPRetryPattern retrySettings,
int batchSize,
int pollTimeInMS) {
if (factory == null) {
throw new IllegalArgumentException("Connection factory is undefined");
}
if (addresses == null || addresses.length == 0) {
throw new IllegalArgumentException("Addresses are undefined");
}
if (settings == null) {
throw new IllegalArgumentException("Settings are undefined");
}
if (batchSize <= 0) {
throw new IllegalArgumentException("Batch size must be greater than 0");
}
if (pollTimeInMS <= 0) {
throw new IllegalArgumentException("Poll time must be greater than 0 ms");
}
this.useExchange = useExchange;
this.settings = settings;
this.batchSize = batchSize;
this.amqpConnection = AMQPConnection.getInstance(factory, addresses, retrySettings);
this.retrySettings = retrySettings;
this.setPollTimeInMS(pollTimeInMS);
}
View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Construct via the Builder, which parses addresses from the configured hosts.
- If constructing directly, pass a non-empty Address[] (e.g. Address.parseAddresses(hosts)).
- Verify the hosts property is set and parses to at least one address.
Example fix
// before: addresses null
new AMQPObservableQueue(factory, null, useExchange, settings, retry, batchSize, pollTimeInMS);
// after: supply a parsed address list
Address[] addresses = Address.parseAddresses("host1:5672,host2:5672");
new AMQPObservableQueue(factory, addresses, useExchange, settings, retry, batchSize, pollTimeInMS); Defensive patterns
Strategy: validation
Validate before calling
if (addresses == null || addresses.length == 0) {
throw new IllegalArgumentException("addresses required; set hosts and use the Builder");
} Prevention
- Use the Builder, which derives addresses from the hosts property.
- Confirm the hosts property parses to at least one Address before constructing.
- Validate direct-construction arguments in a helper.
When it happens
Trigger: Calling the AMQPObservableQueue constructor directly with a null or empty Address[]; the Builder produced an empty array because Address.parseAddresses returned nothing.
Common situations: Direct construction without addresses; a misconfigured hosts property that parsed to an empty list.
Related errors
- Connection factory is undefined
- Settings are undefined
- Batch size must be greater than 0
- Poll time must be greater than 0 ms
- Hosts are undefined
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/0200e3f0bf77bef9.
Report an issue: GitHub.