- postgres: avoid modifying pg type parsers for non-gearshaft managed connections
- (
638dd1d
) message-store: tests: use shorthand notation - (
9c4b38e
) postgres-gateway: limit type parser override to gearshaft controlled pool - (
ca9c6dc
) tools: workaround npm bug during package publish
- postgres: upgrade
pg
dependency to version 8.8.0. No significant impact on performance or subtle improvement.
- (
b2bf2e3
) package: upgrade pg and uuid - (
c0ef290
) package: upgrade dev dependencies - (
8417f8c
) package: pin message-db while npm package is sorted out - (
535cad8
) tools: add compare-latest-results script - (
15a66ad
) benchmark: new baselines (node 18, machine, message-db 1.3.0) - (
e77ebf8
) package: upgrade pg dependency (w/ before-after benchmarks) - (
6131f2b
) package: update dev dependencies
- consumer: expose the configuration parameters used when creating a consumer
- (
a072de4
) consumer: exposes configuration parameters - (
381e859
) package: upgrade message-db version used for testing - (
2271749
) package: upgrade dev dependencies: pino, dependency-cruiser - (
7a334eb
) package: use simple-git-hooks instead of husky - (
2b8acbd
) package: upgrade systeminformation and migrate existing results format
- postgres: upgrade
pg
dependency to version 8.5.1. No significant impact on performance.
- (
bda6ae4
) package: upgrade dependencies (including [email protected])
- postgres: upgrade
pg
dependency to version 8.4.2. Performance either improved or remained the same across all benchmarks.
- (
2d45b8e
) package: upgrade dependencies (including [email protected]), update benchmarks - (
cf5c657
) benchmark: add script and refresh benchmarks
- consumer: allow specifying identifier without consumer group details. Unique identifiers must be provided when operating multiple consumers on the same stream to ensure consumer positions are tracking distinctly.
- retry: propagate the value returned by the function being retried
- (
e317d51
) consumer: allow specifying identifier without consumer group details - (
7a53756
) package: upgrade pg to 8.3.3, confirmed no performance regressions - (
c80e3ef
) retry: support returning the value returned by the retried function - (
ac9bd3f
) CHANGELOG: correct typo
- message-store: read: following up on the last release which introduced SQL filters when retrieving messages, we've now added support for such filters when reading all messages in a stream.
- message-store: read: addressed an issue reading an entire stream when the global batch size was not specified.
- (
132b1b4
) message-store: read: specify default batchSize & allow per-request batchSize - (
a47a536
) message-store: postgres: read: support sql condition - (
1140d2b
) message-store: extract asyncIterableToArray for testing
- message-store: postgres: support custom filtering of messages retrieved via
get
/getCategory
/getStream
.get
/getCategory
/getStream
now accept a SQL fragment via thecondition
option. The SQL fragment is appended to the WHERE clause used to retriving messages viaget_stream_messages
andget_category_messages
.- WARNING: great care must be taken as the
condition
option could be used as a SQL Injection attack vector. - NOTE: Message DB requires the
message_store.sql_condition
setting be configured toon
. Using this feature without activating the configuration option will result in an error. - Thanks go out to sid-360 for contributing custom filtering!
- (
007239f
) package: upgrade [email protected], [email protected] - (
44f8074
) message-store: no need to grow examplePutCategory API to track stream names - (
a808809
) Merge pull request #4 from sid-360/postgres-get-add-sql-condition - (
4acd378
) message-store: postgres: update getCategory - (
6251830
) message-store: postgres: update examplePutCategory - (
cd4cf39
) message-store: postgres: rename test description - (
9e939d7
) message-store: postgres: update getStream
- BREAKING entity-store: fetchRecord now returns a version of
-1
instead ofundefined
when the entity stream in question has no messages. Returning-1
(stream not initialized) is beneficial for handlers that support both initializing a new entity stream and appending to an existing entity stream. Such handlers can simply forwardversion
as theexpectedVersion
for subsequent writes and rest assured that concurrency controls will be enforced for both initial stream writes and existing stream writes.
- (
e46f3df
) entity-store: fetchRecord returns version -1 when stream is empty - (
964b6e9
) package: upgrade dependencies
- BREAKING upgrade
pg
package to v8. Review the minimal breaking changes for details. Minor performance improvements have been observed. - host:
pause
/unpause
/stop
now forward arguments to corresponding runner methods. Custom runners can use the contextual information during theirpause
/unpause
/stop
processing. Runners are not guaranteed to receive arguments since process kill signals do not provide contextual information.
- (
32a37c5
) package: refresh benchmarks after upgrades - (
06b0362
) README: use newer pg in example - (
1a2205c
) package: upgrade dependencies - (
76deffc
) host: pause/unpause/stop support forwarding arguments to runners - (
81f538d
) README: add link to example project. - (
cf91a28
) consumer: update noop-consumer benchmarks - (
a9399a2
) package: upgrade pg from 7 to version 8 - (
f67ee27
) package: upgrade dev dependencies - (
7e0ff7a
) package: add missing GitHub links - (
28afdff
) message-store: add benchmarks for batched writes
- memory message-store: category stream lookup is now
O(1)
instead ofO(countOfAllMessages * charactersInStreamName)
search. Given a store with 100,000 messages, reads / writes are about 1000x faster. - message-store: extract generic benchmarks for use across MessageStore implementations
- (
f411133
) message-store: memory: significant performance improvements - (
e349c89
) message-store: memory: add initial benchmarks - (
73ab408
) message-store: benchmark: disconnect from database once done - (
d54af2f
) message-store: extract abstract get-stream benchmark - (
eeb0919
) message-store: extract abstract write-single-message benchmark
- consumer:
identifier
is required when running a consumer in a group. The identifier is used to isolate position storage amongst consumer group members. - StreamName: support Number and BigInt stream identifiers
- (
94797ca
) package: upgrade non-pg dependencies - (
8862c55
) consumer: add identifier required for consumer groups - (
9758fff
) consumer: example-consumer: reduce verbosity by using Object.assign - (
04a248a
) consumer: position-stream-name: append consumer identifier with dash - (
96454bb
) consumer: position-store: rename event to Recorded from PositionRecorded - (
e24a8e4
) message-store: StreamName: support Number and BigInt stream ids - (
b448feb
) document-projection: include message type in log - (
d1d186e
) document-store: memory: give expert users access to documents
- (
53273af
) message-store: support specifying a batch size for get operations - (
ebedd04
) consumer: add option assertions
- host: emit paused/unpaused/stopped events. Applications can leverage the events to cleanly shut down after consumers have stopped.
- message-store: StreamName: add compound id and cardinal id support
- support creating compound identifiers by supplying array of IDs
- support creating compound identifiers by supplying id and
ids
array - support providing explicit
cardinalId
- message-store: postgres: prevent leaking sensitive data when logging connection errors
- (
6e73cad
) package: upgrade uuid and dev dependencies - (
7538833
) document-store: test: cleanup postgres gateway after tests - (
caab2b6
) logging: throttle: use "warn" log level when recovering from errors - (
bf8b1e9
) host: emit paused/unpaused/stopped events - (
fa9ff31
) message-store: StreamName: add compound id and cardinal id support - (
7437d85
) message-store: postgres: prevent leaking sensitive data in logs - (
a9d4b26
) CHANGELOG: correct typo
- BREAKING consumer: handler exceptions crash the process by default
- consumer: supports configurable
errorStrategy
for dealing with handler errors. If the function does not throw, the message is considered processed. TheerrorStrategy
function receives the following 3 parameters and can be used to retry handlers and/or log errors before throwing:error
: the error thrown by the handlermessageData
: the message data the handler was consumingdispatch
: a function acceptingmessageData
and triggering the associated message handler
- (
df8e8cb
) message-store: postgres: handle errors for managed postgres connections - (
58dcaf4
) logging: throttle: better handle intermittent errors - (
200b6d6
) consumer: throw uncaught exception on error instead of promise rejection - (
6e99f05
) consumer: crash-stop on error, support configurable errorStrategy - (
12481d3
) runner: pause/stop wait for tasks triggered on same tick of the event loop - (
e694281
) runner: stop/pause no longer swallow unhandled rejections - (
08c4de3
) consumer: extract pauseErrorStrategy, preparing for pluggable strategies
- host: support waiting for consumers to finish pausing / stopping
- document-projection: log entries now include the id of the document being updated
- message-store: category: allow retrieval of category name
- (
56ac7eb
) host: pause/stop support waiting for consumers to pause/stop - (
fc595d6
) document-projection: include projection id in log message - (
c7e7c3b
) message-store: category: allow retrieval of category name - (
6a4dd59
) package: upgrade development dependencies - (
93a8d57
) package: upgrade uuid and include in operational dependencies
- postgres-gateway: upgrade
pg
dependency to verion 7.18.2. Performance benchmarks were not significantly impacted.
- (
28b0640
) benchmark: update references to test postgres gateway - (
c373f63
) package: upgrade pg and dev dependencies
- message-store:
StreamName.getId
is now correctly handling ids with dashes
- (
e416c9f
) message-store: StreamName.getId: handle IDs with dashes
- BREAKING document-projection: disambiguate between the stream position used by document-projection to determine whether or not to process a message and the version used by a document-store for optimistic concurrency control. Either customize the
versionField
property to your needs, or recreate View models so they includeglobalPosition
.
- (
0f275bb
) document-projection: rename version field to globalPosition
- document-projection: creating view models has never been easier! Define how events are projected onto a document, specify a document-store to use, and simply create a consumer from the document-projection.
- postgres-message-store: single-message write performance is up 30% by no longer creating a database transaction
- postgres-document-store: postgres-backed storage and retrieval of documents including optimistic concurrency control
- memory-document-store: in-memory storage and retrieval of documents including optimistic concurrency control
- BREAKING: postgres-message-store:
db
option has been renamed topostgresGateway
for anyone directly supplying a connection
- (
23bd6cf
) document-store: postgres: support customizing column names - (
fd8b21a
) document-store: support multiple updates on same doc instance - (
2587330
) package: update build to create the test schema - (
20d0559
) package: update dependencies (pg to 7.17.1) - (
a97cc5a
) document-store: add postgres-document-store - (
452aacd
) document-store: ensure documents are returned with entity type - (
25ddfdb
) document-projection: add idempotence handling and logging - (
0e47c25
) document-projection: support projecting a category stream to documents - (
45e6e0c
) package: remove "examples" directory containing exampleLog - (
32e0372
) errors: normalize how operationError is exported - (
8ff3b04
) document-store: memory: add in-memory document store - (
0b25888
) messaging: test: correct fromReadMessageData test name - (
f69663a
) retry: add retry module w/o needing to take on new dependency - (
300d5f9
) message-store: rename alldb
references topostgresGateway
- (
cb59747
) postgres-gateway: extract from message-store - (
6581c30
) package: generate test table for PostgresGateway - (
b2f7d04
) message-store: improve write perf by 30% - (
024249d
) message-store: benchmark writing single message - (
e93997c
) CHANGELOG: remove duplicate section
- messaging: write substitute is not bound to in-memory message store by default. Writes are no-ops that always succeed - stream expected version checking is not performed. Use the rich set of assertion methods provided by the substitute to validate a message was written with the corrrect expected version.
- (
601a7d1
) tools: use version sort when finding last version - (
1b9c8d4
) messaging: write substitute: default to inert message-store write
- message-store: ease creation of entity stream names from a category.
- messaging: add convenience method
assertStreamWritesInitial
for asserting a set of writes occurred at the start of a stream. - messaging: bug fix: raise correct error when asserting a set of writes occurred but no writes were made
- (
909c93a
) messaging: write: add assertStreamWritesInitial - (
ee7218c
) messaging: write: substitute: fix asserting expected version when no writes - (
7c2228d
) message-store: category: support creating entity stream names
- consumer: support parallel processing via consumer groups.
- message-store: support filtering messages in a category by consumer group.
- (
ef90298
) package: upgrade pg to 7.15.1 - (
95f6969
) message-store: support configuring group size/member via env variable - (
1f37027
) consumer: support consumer group - (
535b99c
) message-store: getCategory: support consumer groups - (
8ff542b
) message-store: StreamName: support parsing cardinal id - (
10db52a
) tools: add release note generator - (
b94a969
) CHANGELOG: reformat commit sections
- message-store: messages read from a category can now be filtered by supplying a
correlation
category name. - consumer: a consumer can now ignore messages unrelated to its workflows by specifying the
correlation
option. Only messages with acorrelation_stream_name
matching the suppliedcorrelation
category will be consumed. - BREAKING: get/read now accept position as a named option rather than positional parameter.
- (
fc713f0
) message-store: add basic getStream benchmark - (
43ee2e7
) benchmark: include node version in results - (
dfa4370
) consumer: use benchmark library and adjust result schema accordingly - (
77aebc9
) benchmark: add writeStatsFile - (
9def2f8
) benchmark: add computeStats and getSystemInfo functions and tests - (
f47e19f
) consumer: move bulkWrite and cycle out of consumer - (
c74695b
) consumer: update noop-consumer benchmark results - (
cbff5ca
) message-store: get supports filtering by correlation stream name - (
df85ec0
) message-store: get/read now accept position as named option - (
d2b909e
) message-store: read: position is supplied as named option
- BREAKING: Gearshaft now depends on @eventide/message-db for the Postgres message store. Existing databases must be migrated.
- Message stores now export
getCategory
andgetStream
functions for working explicitly with category streams and entity streams. - CONTRIBUTORS: Ruby is no longer required for working on Gearshaft!
- (
161f624
) package: bump version to 0.7.0 - (
f743a1a
) tools: github workflow no longer needs ruby - (
fa6f86e
) consumer: use getCategory explicitly - (
0461df0
) message-store: memory: export getCategory and getStream - (
1948f2e
) message-store: exports getCategory & getStream, separate tests - (
aaedd43
) message-store: add examplePutCategory - (
e4c1ae5
) errors: add assertTruthy - (
e63d4ba
) messaging: use assertStrictEqual - (
16d2bb6
) errors: add assertStrictEqual - (
ada490a
) message-store: separate category and stream get implementations - (
30ef27f
) package: leverage @eventide/message-db
The publish for 0.7.0 mysteriously disappeared. The publish completed successfully, and npm sent out publish completed email, but the new version never appeared in the registry.
EDIT: It turns out npm
was having issues and release was delayed by a long time. v0.7.0 is equivalent to v0.7.1.
- Adds
EntityStoreSubstitute
which can be used by handler test suites wanting to exercise different states of an entity. Entities can be added to an instance ofEntityStoreSubstitute
via theadd
function. assertNoWrites
has been added toWriterSubstitute
. Test suites can now assert no writes have occurred to a specific stream or any streams all together.
- (
2fae100
) entity-store: don't nest entity under record metadata - (
1531ccd
) package: upgrade dev dependencies - (
0326775
) entity-store: introduce EntityStoreSubstitute - (
f267a59
) messaging: write substitute: add assertNoWrites assertion
- EntityStore now supports obtaining the version of the entity being fetched via the
fetchRecord
function. Additional metadata will be made available once entity caching support is added.const [ entity, { version } ] = store.fetchRecord(id)
follow
now supports providing an object with additional fields. Additional fields areObject.assign
ed together with fields from the message being followed before the subsequent message is created.follow
now looks for a static method namedcreate
on the constructor of the subsequent message. If acreate
method is found,follow
will call it to build the subsequent message rather than using the class constructor and assigning fields. Thecreate
implementation is responsible for assigning fields to the returned message instance. This is an ideal place to introduce message schema validation.
- (
bc827d7
) messaging: follow: support providing additional fields - (
1509ccf
) package: upgrade dependencies - (
3e3e1c3
) messaging: follow supports custom message creation
createWriterSubstitute
now supports specifying a message store. A message store instance can be used when exercising a handler that writes (via the substitute to benefit from assertions) and reads from the message store.
- (
0e5fd2e
) messaging: write-substitute: accept message store - (
ec629b8
) package: add way to browse dependency graph - (
ed7a682
) package: consumer: normalize importing of examples
- Adds
createEntityProjection
function - EntityProjection allows projecting messages easily onto entity
- (
7369a9f
) package: bump version to 0.3.0 - (
7360bee
) entity-store: normalize createEntityStore exports - (
ac4ed78
) entity-store: accept projection instead of registerHandlers function - (
dc16dd5
) entity-projection: add createEntityProjection - (
bc9b0c1
) entity-store: move examples to entity-projection - (
5423c67
) messaging: event-registry: decouple from MessageData - (
ee4e26a
) messaging: normalize event-registry export - (
1e1262c
) consumer: log duration of handler
- Adds host for running / stopping / pausing / un-pausing consumers based on OS process signals.
- Bug fix: don't copy message
id
when following a message. - Simplify creation of command category names.
- (
9eede95
) package: update dependencies - (
05b225e
) messaging: follow: clear id when copying fields - (
913eefd
) message-store: category: support creating command category name - (
b279661
) message-store: memory: mimic async behaviour - (
b5eb85a
) consumer: retry and log errors fetching initial position - (
3e873ac
) logging: extract throttleErrorLogging from consumer - (
218e1f7
) host: support stop, pause, unpause of host - (
e74d4c6
) host: refactor tests - (
81f6be8
) host: initial implementation (missing logging) - (
91d149a
) runner: extract exampleRunner