connect()
connect() constructs Pulse immediately and creates one background readiness promise. Use awaitConnection() during application startup to surface connection, topology, permission, and index errors before accepting traffic.
Connection options
Strings must be non-empty. Durations and worker counts must be finite positive numbers, except retention, retry counts, and retry delays may be zero where their types allow it.
pulse.awaitConnection()
publish(), subscribe(), and history.find() call it internally.
pulse.publish()
_id is a UUIDv7 string. Pulse never uses MongoDB ObjectId for its own documents.
pulse.subscribe()
Subscription options
The handler can return
void or Promise<void>:
PulseReceivedEvent contains every published event field plus consumerGroup and the one-based attempt number.
The returned subscription contains the resolved options and an idempotent asynchronous unsubscribe() method.
pulse.getSubscriptions()
pulse.history.find()
History filters
Results are sorted by UUIDv7
_id descending:
pulse.close()
Exported errors
Collections
The names usecollectionPrefix, which defaults to orionjs.pulse:
Every Pulse-created
_id, lock owner, and fencing token is a UUIDv7 string.