diff --git a/java/src/org/openqa/selenium/grid/commands/DefaultStandaloneConfig.java b/java/src/org/openqa/selenium/grid/commands/DefaultStandaloneConfig.java index b3df88c9934ca..f4dfe1ff01c7f 100644 --- a/java/src/org/openqa/selenium/grid/commands/DefaultStandaloneConfig.java +++ b/java/src/org/openqa/selenium/grid/commands/DefaultStandaloneConfig.java @@ -25,7 +25,10 @@ class DefaultStandaloneConfig extends MapConfig { DefaultStandaloneConfig() { super( Map.of( + "events", Map.of("implementation", "org.openqa.selenium.events.local.GuavaEventBus"), "sessions", - Map.of("implementation", "org.openqa.selenium.grid.sessionmap.local.LocalSessionMap"))); + Map.of( + "implementation", + "org.openqa.selenium.grid.sessionmap.local.LocalSessionMap"))); } } diff --git a/java/src/org/openqa/selenium/grid/server/EventBusOptions.java b/java/src/org/openqa/selenium/grid/server/EventBusOptions.java index 4505e2abe8361..a78e833186465 100644 --- a/java/src/org/openqa/selenium/grid/server/EventBusOptions.java +++ b/java/src/org/openqa/selenium/grid/server/EventBusOptions.java @@ -25,8 +25,7 @@ public class EventBusOptions { static final String EVENTS_SECTION = "events"; - private static final String GUAVA_BUS_CLASS = "org.openqa.selenium.events.local.GuavaEventBus"; - private static final String ZEROMQ_BUS_CLASS = "org.openqa.selenium.events.zeromq.ZeroMqEventBus"; + private static final String DEFAULT_CLASS = "org.openqa.selenium.events.zeromq.ZeroMqEventBus"; private static final int DEFAULT_HEARTBEAT_PERIOD = 60; private final Config config; private volatile EventBus bus; @@ -57,13 +56,6 @@ public Duration getHeartbeatPeriod() { } private EventBus createBus() { - // Determine default implementation based on EventBus configuration: - // - If publish/subscribe endpoints are configured: use ZeroMqEventBus (distributed mode) - // - Otherwise: use GuavaEventBus (standalone mode, in-process, more efficient) - boolean hasZmqConfig = - config.get(EVENTS_SECTION, "publish").isPresent() - || config.get(EVENTS_SECTION, "subscribe").isPresent(); - String defaultClass = hasZmqConfig ? ZEROMQ_BUS_CLASS : GUAVA_BUS_CLASS; - return config.getClass(EVENTS_SECTION, "implementation", EventBus.class, defaultClass); + return config.getClass(EVENTS_SECTION, "implementation", EventBus.class, DEFAULT_CLASS); } }