Skip to content

Latest commit

 

History

History
488 lines (330 loc) · 35.2 KB

CHANGELOG.md

File metadata and controls

488 lines (330 loc) · 35.2 KB

v0.15.8: avoid global pg configurations (2022-12-02)

Highlights

  • postgres: avoid modifying pg type parsers for non-gearshaft managed connections

Commits

  • (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

v0.15.7: upgrade dependencies, including pg (2022-12-01)

Highlights

  • postgres: upgrade pg dependency to version 8.8.0. No significant impact on performance or subtle improvement.

Commits

  • (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

v0.15.6: expose consumer parameters (2021-03-29)

Highlights

  • consumer: expose the configuration parameters used when creating a consumer

Commits

  • (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

v0.15.5: upgrade dependencies, including pg (2020-12-26)

Highlights

  • postgres: upgrade pg dependency to version 8.5.1. No significant impact on performance.

Commits

v0.15.4: upgrade dependencies, including pg (2020-10-30)

Highlights

  • postgres: upgrade pg dependency to version 8.4.2. Performance either improved or remained the same across all benchmarks.

Commits

v0.15.3: consumer & retry enhancements (2020-09-11)

Highlights

  • 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

Commits

  • (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

v0.15.2: support custom filters via read (2020-08-07)

Highlights

  • 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.

Commits

  • (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

v0.15.1: support custom filters when retrieving messages (2020-07-28)

Highlights

  • message-store: postgres: support custom filtering of messages retrieved via get/getCategory/getStream.
    • get/getCategory/getStream now accept a SQL fragment via the condition option. The SQL fragment is appended to the WHERE clause used to retriving messages via get_stream_messages and get_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 to on. Using this feature without activating the configuration option will result in an error.
    • Thanks go out to sid-360 for contributing custom filtering!

Commits

  • (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

v0.15.0: entity-store enhancement (2020-07-08)

Highlights

  • BREAKING entity-store: fetchRecord now returns a version of -1 instead of undefined 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 forward version as the expectedVersion for subsequent writes and rest assured that concurrency controls will be enforced for both initial stream writes and existing stream writes.

Commits

  • (e46f3df) entity-store: fetchRecord returns version -1 when stream is empty
  • (964b6e9) package: upgrade dependencies

v0.14.0: upgrade pg dependency to v8 (2020-05-18)

Highlights

  • 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 their pause/unpause/stop processing. Runners are not guaranteed to receive arguments since process kill signals do not provide contextual information.

Commits

  • (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

v0.13.4: memory message store performance (2020-04-12)

Highlights

  • memory message-store: category stream lookup is now O(1) instead of O(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

Commits

  • (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

v0.13.3: consumer identifier support (2020-04-09)

Highlights

  • 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

Commits

  • (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

v0.13.2: configurable batch sizes (2020-04-07)

Commits

  • (53273af) message-store: support specifying a batch size for get operations
  • (ebedd04) consumer: add option assertions

v0.13.1: host events & compound stream ids (2020-04-01)

Highlights

  • 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

Commits

  • (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

v0.13.0: consumer: configurable error handling (2020-03-30)

Highlights

  • 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. The errorStrategy 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 handler
    • messageData: the message data the handler was consuming
    • dispatch: a function accepting messageData and triggering the associated message handler

Commits

  • (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

v0.12.3: minor operational enhancements (2020-03-10)

Highlights

  • 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

Commits

  • (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

v0.12.2: postgres library upgrade (2020-02-25)

Highlights

  • postgres-gateway: upgrade pg dependency to verion 7.18.2. Performance benchmarks were not significantly impacted.

Commits

  • (28b0640) benchmark: update references to test postgres gateway
  • (c373f63) package: upgrade pg and dev dependencies

v0.12.1: support dashes in stream ids (2020-01-23)

Highlights

  • message-store: StreamName.getId is now correctly handling ids with dashes

Commits

  • (e416c9f) message-store: StreamName.getId: handle IDs with dashes

v0.12.0: document-projection position field (2020-01-18)

Highlights

  • 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 include globalPosition.

Commits

  • (0f275bb) document-projection: rename version field to globalPosition

v0.11.0: document projection support (2020-01-17)

Highlights

  • 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 to postgresGateway for anyone directly supplying a connection

Commits

  • (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 all db references to postgresGateway
  • (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

v0.10.1: inert write substitute (2020-01-02)

Highlights

  • 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.

Commits

  • (601a7d1) tools: use version sort when finding last version
  • (1b9c8d4) messaging: write substitute: default to inert message-store write

v0.10.0: minor usability enhancements (2020-01-01)

Highlights

  • 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

Commits

  • (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

v0.9.0: consumer group support (2019-12-22)

Highlights

  • consumer: support parallel processing via consumer groups.
  • message-store: support filtering messages in a category by consumer group.

Commits

  • (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

v0.8.0: support correlated messaging

Highlights

  • 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 a correlation_stream_name matching the supplied correlation category will be consumed.
  • BREAKING: get/read now accept position as a named option rather than positional parameter.

Commits

  • (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

v0.7.1: use @eventide/message-db package for database

Highlights

  • BREAKING: Gearshaft now depends on @eventide/message-db for the Postgres message store. Existing databases must be migrated.
  • Message stores now export getCategory and getStream functions for working explicitly with category streams and entity streams.
  • CONTRIBUTORS: Ruby is no longer required for working on Gearshaft!

Commits

  • (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

v0.7.0: --- skipped ---

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.

v0.6.0: improved experience for implementing handler test cases

Highlights

  • 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 of EntityStoreSubstitute via the add function.
  • assertNoWrites has been added to WriterSubstitute. Test suites can now assert no writes have occurred to a specific stream or any streams all together.

Commits

  • (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

v0.5.0: entity-store: add fetchRecord support

Highlights

  • 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)
    

v0.4.0: follow enhancements

Highlights

  • follow now supports providing an object with additional fields. Additional fields are Object.assigned together with fields from the message being followed before the subsequent message is created.
  • follow now looks for a static method named create on the constructor of the subsequent message. If a create method is found, follow will call it to build the subsequent message rather than using the class constructor and assigning fields. The create implementation is responsible for assigning fields to the returned message instance. This is an ideal place to introduce message schema validation.

Commits

  • (bc827d7) messaging: follow: support providing additional fields
  • (1509ccf) package: upgrade dependencies
  • (3e3e1c3) messaging: follow supports custom message creation

v0.3.1: messaging: write substitute: accept message store

Highlights

  • 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.

Commits

  • (0e5fd2e) messaging: write-substitute: accept message store
  • (ec629b8) package: add way to browse dependency graph
  • (ed7a682) package: consumer: normalize importing of examples

v0.3.0: EntityProjection

Highlights

  • Adds createEntityProjection function
  • EntityProjection allows projecting messages easily onto entity

Commits

  • (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

v0.2.0: Consumer Host Support

Highlights

  • 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.

Commits

  • (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

v0.1.1: default to null object logger

v0.1.0: improve message-store creation experience

v0.0.3-beta: adds Category

0.0.2-beta

0.0.1-beta: exclude test and tools from package