flowable/flowable-engine · error · ActivitiException

Message dispatcher is disabled, cannot dispatch event

Error message

Message dispatcher is disabled, cannot dispatch event

What it means

This command requires the process engine's event dispatcher to be enabled. If eventDispatcher.isEnabled() is false (events support turned off in configuration), dispatching is impossible and an ActivitiException is thrown rather than silently dropping the event.

Solutions

  1. Enable the event dispatcher: processEngineConfiguration.setEventDispatcherEnabled(true)
  2. Remove or gate the dispatchEvent call behind a check of configuration.isEventDispatcherEnabled()
  3. Align configuration between environments so event support is enabled wherever dispatch code runs

Example fix

// before
runtimeService.dispatchEvent(event);
// after
if (processEngine.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
    runtimeService.dispatchEvent(event);
}
Defensive patterns

Strategy: validation

Validate before calling

if (!processEngine.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) { throw new IllegalStateException("Event dispatcher is disabled"); }

Type guard

boolean canDispatch(ProcessEngine pe) { return pe.getProcessEngineConfiguration().getEventDispatcher().isEnabled(); }

Try / catch

try { runtimeService.dispatchEvent(event); } catch (ActivitiException e) { LOGGER.warn("Event dispatch failed: {}", e.getMessage()); }

Prevention

When it happens

Trigger: Calling runtimeService.dispatchEvent(event) on an engine configured with event support disabled, i.e. processEngineConfiguration.setEventDispatcherEnabled(false) or an equivalent Spring Boot property.

Common situations: Teams that disabled event logging/Dispatch for performance, then deployed code (custom listeners, integrations) that still dispatches events; copy-pasted configuration across environments.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/fddb1d9fb9d0475a. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/cmd/DispatchEventCommand.java:44

 */
public class DispatchEventCommand implements Command<Void> {

    protected FlowableEvent event;

    public DispatchEventCommand(FlowableEvent event) {
        this.event = event;
    }

    @Override
    public Void execute(CommandContext commandContext) {
        if (event == null) {
            throw new ActivitiIllegalArgumentException("event is null");
        }

        if (commandContext.getEventDispatcher().isEnabled()) {
            commandContext.getEventDispatcher().dispatchEvent(event, EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG);
        } else {
            throw new ActivitiException("Message dispatcher is disabled, cannot dispatch event");
        }

        return null;
    }

}

View on GitHub (pinned to d6d39ce1c6)