v4.0.0
Breaking changes
Add emitEnabled
option to createProjection
.
Due to a bug on the server, previously, the trackEmittedStreams
option was setting emitEnabled
, and not trackEmittedStreams
. This release adds the emitEnabled
option and corrects the behaviour of trackEmittedStreams
, with a polyfill for earlier server versions. View
Before:
Setting trackEmittedStreams
would enable emitting, but not track streams.
await client.createProjection(PROJECTION_NAME, projectionQuery, {
trackEmittedStreams: true,
});
After:
Setting emitEnabled
works as expected:
await client.createProjection(PROJECTION_NAME, projectionQuery, {
emitEnabled: true,
});
Setting both emitEnabled
and trackEmittedStreams
works as expected:
await client.createProjection(PROJECTION_NAME, projectionQuery, {
emitEnabled: true,
trackEmittedStreams: true,
});
Setting only trackEmittedStreams
will be rejected by the server:
// incorrect
await client.createProjection(PROJECTION_NAME, projectionQuery, {
trackEmittedStreams: true,
});
Features
Add position to events from stream
When connected to a server that supports it (>22.6), events read from a stream will include their commit and prepare position. View
Bug Fixes
- Prevent multiple appends within the same event loop creating many batches, and improve backpressure. View
- Destroy read stream if stream is not found. View
- Only swallow unimplemented errors when creating server-features. View