EventTopic — Local
Source: reventless-local/src/adapter/EventTopic/LocalEventTopicPublisher.res
AWS equivalent: EventTopic → SNS
How It Works
Events are published to the shared LocalBus using Bus.publishEvent. The bus fans out events to all subscribers using Effect's PubSub primitive. The topic name (set during make) is used as the bus topic key.
The adapter returns a dummy resource with the topic name, which LocalEventCollectorChannel uses to subscribe to the correct bus topic.
Operations
| Operation | Description |
|---|---|
publishJson | Publishes a single event to the bus topic |
publishJsonStream | Stream variant — groups items into batches of 10 |
Key Differences from AWS
| Aspect | Local | AWS |
|---|---|---|
| Transport | Effect PubSub fan-out | SNS topic |
| Delivery | Synchronous (2-3 microtask ticks) | Asynchronous SNS → SQS |
| Subscribers | Bus subscribers | SNS subscriptions (SQS, Lambda, etc.) |
| Fan-out | Unbounded or bounded PubSub | SNS unlimited subscriptions |