All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
1.0.0 - 2023-11-29
- Removed Event.persisted? as it was potentially misleading (#235)
0.24.0 - 2021-11-18
- Test against Ruby 3.0 in the CI build (#229).
- Use GitHub Actions for the CI build instead of Travis CI (#228).
- This project now uses
main
as its default branch (#230).- Documentation updated to refer to
main
and links updated accordingly.
- Documentation updated to refer to
- Remove Ruby 2.3, 2.4 and 2.5 from the CI test matrix (#232).
0.23.1 - 2020-10-02
-
Upgrade development dependency Rake to version 13. This resolves CVE-2020-8130.
-
Patch
ESPRunner
to gracefully handle terminating subprocesses it did not start (#223). -
Resolve warnings raised by Ruby 2.7 (#225).
0.23.0 - 2019-07-11
-
Add Ruby 2.6 to the CI test matrix.
-
ESPRunner
supports anafter_subprocess_termination
hook. This optional initializer argument will will be executed when each child process terminates. This allows for monitoring and alerts to be configured. For example, Rollbar:EventSourcery::EventProcessing::ESPRunner.new( event_processors: processors, event_source: source, after_subprocess_termination: proc do |processor:, runner:, exit_status:| if exit_status != 0 Rollbar.error("Processor #{processor.processor_name} "\ "terminated with exit status #{exit_status}") end end ).start!
-
ESPRunner
exposes three new public methodsstart_processor
,shutdown
, andshutdown_requested?
. These provide options for handling subprocess failure/termination. For example, shutting down theESPRunner
:EventSourcery::EventProcessing::ESPRunner.new( event_processors: processors, event_source: source, after_subprocess_termination: proc do |processor:, runner:, exit_status:| runner.shutdown end ).start!
Or restarting the event processor:
EventSourcery::EventProcessing::ESPRunner.new( event_processors: processors, event_source: source, after_subprocess_termination: proc do |processor:, runner:, exit_status:| runner.start_processor(processor) unless runner.shutdown_requested? end ).start!
-
ESPRunner
checks for dead child processes every second. This means we shouldn't see[ruby] <defunct>
in the process list (ps) when a processor fails. -
ESPRunner
logs when child processes die. -
ESPRunner
logs when sending signals to child processes.
- Remove Ruby 2.2 from the CI test matrix.
0.22.0 - 2018-10-04
-
Log critical exceptions to the application provided block via the new configuration option (#209):
config.on_event_processor_critical_error = proc do |exception, processor_name| # report the death of this processor to an error reporting service like Rollbar. end
0.21.0 - 2018-07-02
- Graceful shutdown interrupts poll-wait sleep for quicker quitting (#207).
- Added
bug_tracker_uri
,changelog_uri
andsource_code_uri
to project metadata (#205).
- Fixed a bug where ESPRunner would raise an error under certain circumstances (#203).
0.20.0 - 2018-06-21
- Changed signature of
ESPProcess#initialize
to include a default value forafter_fork
. This prevents theafter_fork
change from 0.19.0 from being a breaking change to external creators of ESPProcess. - Added more logging when a fatal exception occurs in ESPProcess
0.19.0 - 2018-06-06
- Allow passing an
after_fork
lambda toESPRunner
that is called after eachESPProcess
is forked
0.18.0 - 2018-05-23
- Allow specifying a subscription batch size
0.17.0 - 2018-03-22
- Allow changing the event class using Event#with
- Allow upcasting events using custom event classes
0.16.1 - 2018-01-17
- Fixed bug with Sequel gem expecting processes_event_types to be an Array
0.16.0 - 2018-01-02
-
Added additional logging for retries to the ExponentialBackoffRetry error handler
-
Remove
processes_events
and related methods in favour ofprocess
class method. You can no longer overrideprocess
and subscribe to all events. If you want to subscribe to all events you can call theprocess
class method with no events.process do |event| # all events will be subscribed to end process Foobar do |event| # Foobar events will be subscribed to end
0.15.0 - 2017-11-29
- Added in the first version of the yard documentation.
- Improved EventProcessingError messages
- Fixed typo in constant name
EventSourcery::EventProcessing::ErrorHandlers::ConstantRetry::DEFAULT_RETRY_INTERVAL
- Fixed typo in constant name
EventSourcery::EventProcessing::ErrorHandlers::ExponentialBackoffRetry::DEFAULT_RETRY_INTERVAL
- Fixed typo in constant name
EventSourcery::EventProcessing::ErrorHandlers::ExponentialBackoffRetry::MAX_RETRY_INTERVAL
- Errors of type
Exception
are now logged before being allowed to propagate.
0.14.0 - 2016-06-21
- Added
Event#to_h
method. This returns a hash of the event attributes. - Added
Event#with
method. This provides a way to create a new event identical to the old event except for the provided changes. Event#initialize
acceptsaggregate_id
parameter that either is a strings or responds toto_str
.
0.13.0 - 2016-06-16
- The core Event class accepts
causation_id
to allow event stores to add support for tracking causation ids with events. - The core Memory event store saves the
causation_id
andcorrelation_id
.
- The event store shared RSpec examples specify event stores should save
the
causation_id
andcorrelation_id
.
- The
processing_event
method from the memory tracker. It was intended to be a mechanism to wrap processing and tracker updates which appears to be universally unused at this point.
0.12.0 - 2017-06-01
- Removed usage
#shutdown!
as it should be a private method within custom PollWaiters. An example of how event_sourcery-postgres has implemented#shutdown!
can be found here
0.11.2 - 2017-05-29
- Fixed: default poll waiter now implements
shutdown!
0.11.1 - 2017-05-29
- Use
processor.class.name
to set ESP process name - Convert
processor_name
symbol to string explicitly
0.11.0 - 2017-05-26
- Make Event processing error handler class Configurable
- Add exponential back off retry error handler
0.10.0 - 2017-05-24
- The core Event class accepts
correlation_id
to allow event stores to add support for tracking correlation IDs with events. Repository#save
for saving aggregate instances.- Configuration option to define custom event body serializers.
- Resolved Sequel deprecation notice when loading events from the Postgres event store.
- Aggregates no longer save events directly to an event sink. They must be
passed back to the repository for saving with
repository.save(aggregate)
. AggregateRoot#apply_event
signature has changed from accepting an event or a hash to accepting an event class followed by what would normally go in the constructor of the event.
- Postgres specific code has moved to the event_sourcery-postgres gem.
Config options for postgres have moved to
EventSourcery::Postgres.config
.
0.9.0 - 2017-05-02
- Add
table_prefix
method toTableOwner
to declare a table name prefix for all tables in a projector or reactor.
- Schema change: the
writeEvents
function has been refactored slightly. - The
Event
class no longer usesVirtus.value_object
. AggregateRoot
andRepository
are namespaced underEventSourcery
instead ofEventSourcery::Command
.EventSourcery::Postgres
namespace has been extracted fromEventSourcery::(EventStore|EventProcessing)::Postgres
in preparation for moving all Postgres related code into a separate gem.- An advisory lock has replaced the exclusive table lock used to synchronise event inserts.
- EventSourcery no longer depends on Virtus.
Command
andCommandHandler
have been removed.