apache/druid · error · ISE
Unknown type of emitter. Please set
Error message
Unknown type of emitter. Please set [%s], [%s] or provide registered subtype of org.apache.druid.java.util.emitter.core.factory.EmitterFactory via [%s]
What it means
Emitters.create() builds an emitter from configuration properties by detecting the emitter type. If none of the recognized properties (log emitter, http emitter, or custom EmitterFactory type) is present, it throws IllegalStateException telling the user which properties to set. Druid cannot determine what kind of emitter to instantiate.
Solutions
- Set org.apache.druid.java.util.emitter.http.url for an HTTP emitter, e.g. http://recipient:8080/druid/metrics
- Or set org.apache.druid.java.util.emitter.logging.logLevel (e.g. "info") for a logging emitter
- Or configure org.apache.druid.java.util.emitter.type with a registered EmitterFactory subtype
- Verify the properties file is actually on the classpath and loaded into the Properties object
Example fix
// before (runtime.properties) # no emitter config // after org.apache.druid.java.util.emitter.http.url=http://metrics-host:8080/druid/metrics
Defensive patterns
Strategy: validation
Validate before calling
Properties props = ...;
boolean hasEmitter = props.getProperty("org.apache.druid.java.util.emitter.logging.logLevel") != null
|| props.getProperty("org.apache.druid.java.util.emitter.http.url") != null
|| props.getProperty("org.apache.druid.java.util.emitter.type") != null;
if (!hasEmitter) {
throw new IllegalStateException("No emitter configured: set http url, logging level, or custom type");
} Try / catch
try {
Emitter e = Emitters.create(props);
} catch (IllegalStateException ex) {
log.error(ex, "Emitter configuration missing");
throw ex;
} Prevention
- Always set at least one emitter property (http url, logging logLevel, or custom type)
- Copy property keys exactly; they are long and easy to mistype
- Verify runtime.properties is loaded into the Properties object passed to create
- Add a config smoke test that constructs the emitter at startup
When it happens
Trigger: Calling Emitters.create(Properties) when neither org.apache.druid.java.util.emitter.logging.logLevel, org.apache.druid.java.util.emitter.http.url, nor org.apache.druid.java.util.emitter.type (custom emitter type) is configured.
Common situations: Missing or misnamed emitter properties in runtime.properties; config file not loaded so properties are empty; upgrading Druid where the old type property name changed; typo in property key.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- At most one of 'druid.broker.segment.watchedTiers' and…
- bitmapEncoding[ ] does not match indexSpec.bitmap[ ]
- Cannot mix sortable and unsortable key columns
- Compression value [ ] is greater than the max allowed…
- DynamicPartitionsSpec must be used for best-effort rollup
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/8c472cfac791b33e.
Report an issue: GitHub.
Appendix: source
Thrown at processing/src/main/java/org/apache/druid/java/util/emitter/core/Emitters.java:63
public static Emitter create(
Properties props,
AsyncHttpClient httpClient,
ObjectMapper jsonMapper,
Lifecycle lifecycle
)
{
Map<String, Object> jsonified;
if (props.getProperty(LOG_EMITTER_PROP) != null) {
jsonified = makeLoggingMap(props);
jsonified.put("type", "logging");
} else if (props.getProperty(HTTP_EMITTER_PROP) != null) {
jsonified = makeHttpMap(props);
jsonified.put("type", "http");
} else if (props.getProperty(CUSTOM_EMITTER_TYPE_PROP) != null) {
jsonified = makeCustomFactoryMap(props);
} else {
throw new ISE(
"Unknown type of emitter. Please set [%s], [%s] or provide registered subtype of org.apache.druid.java.util.emitter.core.factory.EmitterFactory via [%s]",
LOG_EMITTER_PROP,
HTTP_EMITTER_PROP,
CUSTOM_EMITTER_TYPE_PROP
);
}
return jsonMapper.convertValue(jsonified, EmitterFactory.class).makeEmitter(jsonMapper, httpClient, lifecycle);
}
// Package-visible for unit tests
static Map<String, Object> makeHttpMap(Properties props)
{
Map<String, Object> httpMap = new HashMap<>();
final String urlProperty = "org.apache.druid.java.util.emitter.http.url";
final String baseUrl = props.getProperty(urlProperty);View on GitHub (pinned to 9b90983fd2)