Skip to content

Commit

Permalink
Amend default node config to allow users to override event bus flags
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Oct 11, 2021
1 parent 81612e8 commit cb873db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static EventBus create(Config config) {
return mungeUri(uri, "tcp", 4442);
});

String subscribe = config.get(EVENTS_SECTION, "publish")
String subscribe = config.get(EVENTS_SECTION, "subscribe")
.orElseGet(() -> {
URI uri = config.get("node", "hub-address")
.map(Urls::from)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ class DefaultNodeConfig extends MapConfig {

DefaultNodeConfig() {
super(ImmutableMap.of(
"events", ImmutableMap.of(
"publish", "tcp://*:4442",
"subscribe", "tcp://*:4443"),
"node", ImmutableMap.of(
// We use this instead of setting the default ports for
// the publish and subscribe ports of the event bus so
// that people can use the `--hub` flag safely.
"hub-address", "http://0.0.0.0:4444"
),
"server", ImmutableMap.of(
"port", 5555)));
}
Expand Down

0 comments on commit cb873db

Please sign in to comment.