Alpha Version: You are viewing the ALPHA documentation. This is an experimental version and may contain breaking changes.
Skip to main content

EventCollector — Local

Source: reventless-local/src/adapter/EventCollector/LocalEventCollectorChannel.res

AWS equivalent: EventCollector → SQS FIFO

How It Works

The connect function subscribes to bus event topics using Bus.subscribeToEventStream. For each event topic resource, it starts an Effect fiber that drains the PubSub stream and calls the runtime handler for each event.

Each message includes a done_ Effect that must be run after processing to unblock the publisher — this ensures that publishEvent does not return until all subscribers have finished processing.

A subscriptionLatch on the runtime signals when subscriptions are registered, so tests can await readiness before publishing.

Operations

OperationDescription
handleChannelEventWraps the event handler for single-event processing
connectSubscribes to all event topic resources via the bus

Key Differences from AWS

AspectLocalAWS
TransportEffect PubSub stream subscriptionDynamoDB Streams / SQS
BackpressureBounded PubSub queues (configurable)SQS visibility timeout
OrderingGuaranteed within topicDynamoDB Streams: per-partition ordered
Completion signaldone_ Effect per messageSQS message deletion