Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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")));
Comment thread
VietND96 marked this conversation as resolved.
}
}
12 changes: 2 additions & 10 deletions java/src/org/openqa/selenium/grid/server/EventBusOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Comment thread
VietND96 marked this conversation as resolved.
private final Config config;
private volatile EventBus bus;
Expand Down Expand Up @@ -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);
}
Comment thread
VietND96 marked this conversation as resolved.
}
Loading