Skip to content

Disambiguate 'broker': rename pkg/broker to pkg/eventbus, qualify CLI command#107

Closed
scion-gteam[bot] wants to merge 3 commits into
mainfrom
scion/cleanup-event-bus-rename
Closed

Disambiguate 'broker': rename pkg/broker to pkg/eventbus, qualify CLI command#107
scion-gteam[bot] wants to merge 3 commits into
mainfrom
scion/cleanup-event-bus-rename

Conversation

@scion-gteam
Copy link
Copy Markdown

@scion-gteam scion-gteam Bot commented May 31, 2026

Summary

Resolves the three-way "broker" naming ambiguity by:

  • Renaming pkg/broker to pkg/eventbus — the NATS-style pub/sub package was an event bus, not a message broker. All types renamed: MessageBrokerEventBus, InProcessBrokerInProcessEventBus, FanOutBrokerFanOutEventBus, etc.
  • Renaming scion broker CLI to scion runtime-broker — with a deprecated broker alias for backward compatibility via cobra Aliases.
  • Updated all import paths, help text examples, and cross-references across 20 files.

Closes #95

Coordination note

The BrokerPluginAdapter (Message Broker plugin system) now satisfies eventbus.EventBus but was NOT itself renamed — "Broker" there correctly refers to the Message Broker concept. The MessageBrokerProxy in pkg/hub/messagebroker.go also retained its name since it bridges the event bus and the messaging system.

Test plan

  • go build ./... passes
  • go test ./pkg/eventbus/... passes (all event bus unit tests)
  • go test ./pkg/hub/... -run Broker passes (message broker proxy tests)
  • go test ./cmd/... -run Broker passes (CLI command registration tests)
  • go test ./cmd/... -run InteractiveOnly passes (output format tests)
  • Old scion broker alias still registered via cobra Aliases

ptone added 3 commits May 31, 2026 16:37
The word "broker" was overloaded across three unrelated concepts:
1. Runtime Broker (CLI command + compute nodes)
2. Message Broker (plugin system for messaging integrations)
3. Event Bus (NATS-style pub/sub for real-time SSE events)

pkg/broker was actually the Event Bus (#3), not the Message Broker (#2).
This rename eliminates the naming collision.

Key identifier renames:
- MessageBroker -> EventBus
- MessageHandler -> EventHandler
- InProcessBroker -> InProcessEventBus
- FanOutBroker -> FanOutEventBus
- NamedBroker -> NamedEventBus
- ErrBrokerClosed -> ErrEventBusClosed

Refs #95
Qualify the CLI command so "broker" no longer ambiguously spans the
Runtime Broker and Message Broker concepts. The old "broker" name is
kept as a deprecated alias via cobra Aliases for backward compatibility.

Updated all help text examples and cross-references to use the new
command name.

Refs #95
@ptone ptone closed this May 31, 2026
@ptone
Copy link
Copy Markdown
Owner

ptone commented May 31, 2026

This pull request has been recreated on the target repository as GoogleCloudPlatform#277.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disambiguate 'broker': rename pkg/broker to pkg/eventbus, qualify CLI command

1 participant