Releases: RailsEventStore/rails_event_store
v0.32.0
RailsEventStore
-
Change: Deprecate
RailsEventStore::ActiveJobDispatcherandRailsEventStore::ActiveJobDispatcher::ActiveJobScheduler. ReadRubyEventStorechangelog below to learn how to use new dispatchers, and use newRailsEventStore::ActiveJobSchedulerscheduler. -
Change: Deprecate
RailsEventStore::AsyncProxyStrategy::AfterCommit. UseAfterCommitAsyncDispatcherinstead. -
Change:
RailsEventStoredefault dispatcher has now changed to use new dispatchers, but still preserving old overall behaviour (dispatch asynchronous if possible, synchronous otherwise) -
Add: Instrumentation for dispatchers. Read more in docs for an overview and list of available hooks. [#455, #244]
regular_dispatcher = RubyEventStore::ComposedDispatcher.new( RubyEventStore::ImmediateAsyncDispatcher.new(scheduler: ActiveJobScheduler.new), RubyEventStore::PubSub::Dispatcher.new ) instrumented_dispatcher = RubyEventStore::InstrumentedDispatcher.new( dispatcher, ActiveSupport::Notifications ) name = "call.dispatcher.rails_event_store" ActiveSupport::Notifications.subscribe(name) do |name, start, finish, id, payload| metric = ActiveSupport::Notifications::Event.new(name, start, finish, id, payload) NewRelic::Agent.record_metric('custom/RES/dispatch', metric.duration) end
-
Add: Instrumentation for repositories. Read more in docs for an overview and list of available hooks. [#423, #244]
repository = RailsEventStoreActiveRecord::EventRepository.new RubyEventStore::Client.new( repository: InstrumentedRepository.new(repository, ActiveSupport::Notifications) ) name = "append_to_stream.repository.rails_event_store" ActiveSupport::Notifications.subscribe(name) do |name, start, finish, id, payload| metric = ActiveSupport::Notifications::Event.new(name, start, finish, id, payload) NewRelic::Agent.record_metric('custom/RES/append_to_stream', metric.duration) end
-
Remove: Deprecated read API has been finally removed. [1778b3c]
-
Remove: Dead initializer argument
page_size:removed. [d179a3b]
RubyEventStore
-
Fix: Enclosed
SRecordintoRubyEventStorenamespace [#394]. -
Change: Deprecate old
AsyncDispatcherandAsyncProxyStrategy::Inline. Now if you want to have only asynchronous inline dispatch, you can useImmediateAsyncDispatcher. If you want to have old behaviour (both async and sync dispatcher), useComposedDispatcher.new(ImmediateAsyncDispatcher.new(scheduler: scheduler), PubSub::Dispatcher.new) -
Change: Dispatchers should no longer raise errors on
verify, but returntrue/falseinstead. It is especially important if you want to use newComposedDispatcher, not relevant otherwise. -
Change: Schedulers API for new dispatchers change, it now use
verifyinstead ofasync_handler?to verify whether handler is correct for given scheduler. -
Add:
ComposedDispatcher— new dispatcher, which accepts at least one dispatcher and dispatch the event to the first dispatcher which accepts the subscriber. -
Add: Linter for schedulers.
-
Fix:
RubyEventStore::InvalidHandlernow does not return very customized (and often wrong) error message, it's now simple error inheriting onStandardError. -
Add:
RubyEventStore::Specification#firstandRubyEventStore::Specification#last. That allows more idiomatic reading of edge events over frequently used enumerator-to-array conversion ofeven_store.read.each.to_a.last. [#399]first_event_in_dummy_stream = event_store.read.stream("Dummy").first last_event_published = event_store.read.last
-
Fix: Ensure immutability in
RubyEventStore::Specificationresult passed to repository. [#416] -
Change:
RubyEventStore::Client#publish,RubyEventStore::Client#appendandRubyEventStore::Client#delete_streamreturnselfinstead of:ok. That is more useful in happy path as it allows chaining. [#413] -
Add:
RubyEventStore::Client#streams_ofnew API to get a list of all streams where event of given id is stored or linked. [#452] -
Remove: Deprecated
RubyEventStore::MethodNotDefinedconst is no more. [60cf00d] -
Remove: Deprecated read API has been finally removed. [1778b3c]
-
Remove: Dead initializer argument
page_size:removed. [d179a3b] -
Change: Refactor
RubyEventStore::Specification&RubyEventStore::SpecificationResult.RubyEventStore::Specificationis just a builder ofRubyEventStore::SpecificationResultthat is passed to event repository. [#417] Closes [#398] -
Add:
RubyEventStore#overwrite(events)to overwrite the events which were already stored -- useful when events schema changes. Requires repository to implementupdate_messages(events)method.
RailsEventStoreActiveRecord
-
Add: Introduce
PgLinearizedEventRepository. This repository uses lock (released at the end of a transaction) to guarantee only one batch of events written concurrently. More on its rationale and limitations can be found in docs [#106, #403]. -
Remove: V1-to-V2 schema migration code is now hosted in
rails_event_store_active_record-legacygem. [#412, #333] -
Add: support for
streams_of- fetching a list of streams where event of given id is stored or linked [#441] -
Add: support for overwriting events feature. For details, read changelog of
RubyEventStore.
AggregateRoot
- no changes
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RailsEventStore::Browser
- Add: Display event data and metadata in collapsible tree widget. [#414]
- Change: Deprecate
rails_event_store-browsergem. This has been replaced byruby_event_store-browserwhich works not only with Rails, but also any other Rack-based app. To be removed on next release.
RubyEventStore::Browser
First release of rails_event_store-browser successor. This Browser has the same functionality but offers much wider applicability, beyond Rails. It can be used as a standalone app or mounted inside existing one.
In Rails:
Rails.application.routes.draw do
mount RubyEventStore::Browser::App.for(
event_store_locator: -> { Rails.configuration.event_store },
host: 'http://localhost:3000',
path: '/res'
) => '/res' if Rails.env.development?
endStandalone config.ru:
require 'ruby_event_store/browser/app'
event_store = RubyEventStore::Client.new(
repository: RubyEventStore::InMemoryRepository.new
)
run RubyEventStore::Browser::App.for(
event_store_locator: -> { event_store },
host: 'http://localhost:4567'
)See browser docs for more.
RubyEventStore::ROM
- Add: support for
streams_of– fetching a list of streams where event of given id is stored or linked [#441]
RailsEventStoreActiveRecord::Legacy
v0.31.1
RailsEventStore
- Fix: Don't use deprecated
link_to_streaminRailsEventStore::LinkByMetadata,RailsEventStore::LinkByCorrelationId,RailsEventStore::LinkByCausationId[37df713]
RubyEventStore
- Fix: Don't use deprecated
link_to_streaminRubyEventStore::LinkByMetadata,RubyEventStore::LinkByCorrelationId,RubyEventStore::LinkByCausationId[37df713]
RailsEventStoreActiveRecord
- no changes
AggregateRoot
- no changes
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RailsEventStore::Browser
- no changes
RubyEventStore::ROM
- no changes
RailsEventStoreActiveRecord::Legacy
- no changes
v0.31.0
Warning
- When upgrading from
v0.30tov0.31, make sure all events serialized when using the old version are already processed by all async handlers and new events are not generated. - Rolling deploy of a new version might cause issues due to slight changes on how events are serialized for async handlers.
RailsEventStore
-
Add: Correlation between events in synchronous event handlers. When you publish events, their metadata will be enriched with
correlation_idandcausation_id[#374]. You can read more about correlation and causation in our documentation. -
Change: Subtle change in metadata assignment disallowing overwriting key, once it is present. [#374]
-
Change: Signature change of
RailsEventStore::ActiveJobDispatcher#callfrom(subscriber, event)to(subscriber, event, serialized_event). Dispatcher receives now also a serialized event (serialization happens via configured mapper, by default that is stillYAML) [#363] -
Change: Signature change of
RailsEventStore::AsyncProxyStrategy::Inline#callandRailsEventStore::AsyncProxyStrategy::AfterCommit#callfrom(klass, event)to(klass, serialized_event). Strategies no longer perform serialization on their own, eliminating duplication of effort and using chosen mapper. [#363] -
Add:
RubyEventStore::Client#deserialize(event_type:, event_id:, data:, metadata:)[#363]For existing asynchronous handlers you need to perform following change from:
class SendOrderEmail < ActiveJob::Base def perform(payload) event = YAML.load(payload) email = event.data.fetch(:customer_email) OrderMailer.notify_customer(email).deliver_now! end end
to:
class SendOrderEmail < ActiveJob::Base def perform(payload) event = event_store.deserialize(payload) email = event.data.fetch(:customer_email) OrderMailer.notify_customer(email).deliver_now! end private def event_store Rails.configuration.event_store end end
or you can use
RailsEventStore::AsyncHandlerclass SendOrderEmail < ActiveJob::Base prepend RailsEventStore::AsyncHandler def perform(event) email = event.data.fetch(:customer_email) OrderMailer.notify_customer(email).deliver_now! end end
-
Add: Introduce
RailsEventStore::LinkByMetadata,RailsEventStore::LinkByCorrelationId,RailsEventStore::LinkByCausationId,RailsEventStore::LinkByEventType. These event handlers allow to partition streams by particular quality. Streams formed by these handlers are made by linking events, therefore are cheap [#382, #346] -
Change: Deprecate
RailsEventStore::Client#publish_eventandRailsEventStore::Client#publish_events. They're now justRailsEventStore::Client#publish[#366, #377] -
Change: Deprecate
RailsEventStore::Client#link_to_stream. This is nowRailsEventStore::Client#link[#388] -
Change: Deprecate
RailsEventStore::Client#append_to_stream. This is nowRailsEventStore::Client#append[#387] -
Add: Introduce
RailsEventStore::AsyncHandlerandRailsEventStore::CorrelatedHandlerto help with correlating events coming from async handlers [#379, #346]. You can read more about correlation and causation in our documentation. -
Add: Introduce
RailsEventStore::CorrelatedCommandsto aid correlating commands going throughcommand_buswith events [#375, #346]. You can read more about correlation and causation in our documentation. -
Change: Breaking change of
RailsEventStore::Client#initializesignature. Out isevent_broker:, insubscriptions:anddispatcher:. Dispatcher is no longer an event broker dependency [#389, #265]
RubyEventStore
-
Remove: Deprecated
RubyEventStore::Client#metadata_prochas been removed. Similar functionality available viaRubyEventStore::Client#with_metadata[#373] -
Add: Correlation between events in synchronous event handlers. When you publish events, their metadata will be enriched with
correlation_idandcausation_id[#374] -
Change: Subtle change in metadata assignment disallowing overwriting key, once it is present. [#374]
-
Change: Signature change of
RubyEventStore::PubSub::Dispatcher#callfrom(subscriber, event)to(subscriber, event, serialized_event). Dispatcher receives now also a serialized event (serialization happens via configured mapper, by default that is stillYAML) [#363] -
Change: Signature change of
RubyEventStore:: PubSub::Broker#notify_subscribersfrom(event)to(event, serialized_event)[#346] -
Add:
RubyEventStore::Client#deserialize(event_type:, event_id:, data:, metadata:)[#346] -
Add: Introduce
RubyEventStore::LinkByMetadata,RubyEventStore::LinkByCorrelationId,RubyEventStore::LinkByCausationId,RubyEventStore::LinkByEventType. These event handlers allow to partition streams by particular quality. Streams formed by these handlers are made by linking events, therefore are cheap [#382, #346] -
Change: Deprecate
RubyEventStore::Client#publish_eventandRubyEventStore::Client#publish_events. They're now justRubyEventStore::Client#publish[#366, #377] -
Change: Deprecate
RubyEventStore::Client#link_to_stream. This is nowRubyEventStore::Client#link[#388] -
Change: Deprecate
RubyEventStore::Client#append_to_stream. This is nowRubyEventStore::Client#append[#387] -
Add: Introduce
RubyEventStore::CorrelatedCommandsto aid correlating commands going throughcommand_buswith events [#375, #346]. You can read more about correlation and causation in our documentation. -
Change: Breaking change of
RubyEventStore::Client#initializesignature. Out isevent_broker:, insubscriptions:anddispatcher:. Dispatcher is no longer an event broker dependency [#389, #265] -
Add: Introduce
RubyEventStore::AsyncDispatcher. Previously the only implementation of asynchronous dispatcher was present in form ofRailsEventStore::ActiveJobDispatcher. This new class allows you to have all benefits of asynchronous dispatch while only requiring you to provide details of your background queue implementation [#381, #383]As an example this is how
RailsEventStore::ActiveJobDispatchercan be implemented (and thus similarSidekiqDispatcher):require 'active_job' module RailsEventStore class ActiveJobDispatcher < AsyncDispatcher def initialize(proxy_strategy: AsyncProxyStrategy::Inline.new) super(proxy_strategy: proxy_strategy, scheduler: ActiveJobScheduler.new) end class ActiveJobScheduler def call(klass, serialized_event) klass.perform_later(serialized_event.to_h) end def async_handler?(klass) Class === klass && klass < ActiveJob::Base end end end end
RailsEventStoreActiveRecord
- no changes
AggregateRoot
- Change: Ensure
publishdoes not incidentally receive anEnumerator(ade8f84)
RailsEventStore::RSpec
-
Add:
publishmatcher to verify expectation on given block of code. Disregards events published beforeexpect { }block [#370]expect { MyService.new.call }.to publish(an_event(FooEvent)).in_stream("Foo$1234").in(event_store)
BoundedContext
- no changes
RailsEventStore::Browser
- no changes
RubyEventStore::ROM
- Add: ROM Memory adapter implementation to allow easily adding alternate ROM implementations. This implements the ROM Memory adapter as an alternative to the ROM SQL adapter. Tests are structured to test ROM implementations easily. A new ROM adapter simply needs to implement the two relations required [#365]
RailsEventStoreActiveRecord::Legacy
- no changes
v0.30.0
RailsEventStore
-
Change: Introduce new read API with fluent interface [#184]
Was:
client = Rails.configuration.event_store client.read_all_streams_forward(count: count, start: start) client.read_all_streams_backward(count: count, start: start) client.read_events_forward(stream_name, count: count, start: start) client.read_events_backward(stream_name, count: count, start: start) client.read_stream_events_forward(stream_name) client.read_stream_events_backward(stream_name)
Is now:
client = Rails.configuration.event_store client.read.from(start).limit(count).each.to_a client.read.from(start).limit(count).backward.each.to_a client.read.stream(stream_name).from(start).limit(count).each.to_a client.read.stream(stream_name).from(start).limit(count).backward.each.to_a client.read.stream(stream_name).each.to_a client.read.stream(stream_name).backward.each.to_a
Building query starts from
read. You can appendlimit,stream,forward,backwardandfromto refine the query further. Finally callingeachexecutes the read, returning enumerator.By default
forwardandfrom(:head)are applied when you don't specify anything. Beware, queries are not bounded unless you say so withlimit.Old reader methods are now deprecated and will be removed in future releases.
To help with migration:- warnings remind of deprecated API usage with some hints on new API equivalent
- script to rewrite old API to new one is distributed with
ruby_event_storegem
Usage for dry run that outputs changes to stderr without modifying source:
bundle exec res-deprecated-read-api-migrator FILE_OR_DIRECTORYUsage for in-place file modification:
bundle exec res-deprecated-read-api-migrator -m FILE_OR_DIRECTORYWhen in doubt, you can also use this script to translate queries from STDIN, i.e.
bundle exec res-deprecated-read-api-migrator -e 'client.read_all_streams_forward' -
Add: Batch API to retrieve data in batches of given size (by default of 100) [#349]
Used internally inRailsEventStore::ProjectionandAggregateRoot.Usage:
client = Rails.configuration.event_store client.read.in_batches.each do |event| # do something with event, handling batches transparently end client.read.in_batches.each_batch do |batch| # do something with batch of default size end client.read.in_batches_of(1000).each_batch do |batch| # do something with batch of size 1000 end
-
Add:
RailsEventStore::Event#correlate_with(event_or_command),RailsEventStore::Event#correlation_idandRailsEventStore::Event#causation_id. You can now correlate messages together which makes debugging much easier [#364] -
Remove: Deprecated
subscribeandsubscribe_to_all_eventssyntax is no more [#350]
RubyEventStore
- Change: Introduce new read API with fluent interface. See usage and migration steps above [#184]
- Add: Introduce batch API. See usage and migration steps above [#349]
- Add:
RubyEventStore::Event#correlate_with(event_or_command),RubyEventStore::Event#correlation_idandRubyEventStore::Event#causation_id. You can now correlate messages together which makes debugging much easier [#364] - Remove: Deprecated
subscribeandsubscribe_to_all_eventssyntax is no more [#350]
RailsEventStoreActiveRecord
- no changes
AggregateRoot
- Change: Use newly-introduced batch reading API to load stream events. This minimizes the risk of huge aggregates allocating lots of memory when reading aggregate stream [#360]
RailsEventStore::RSpec
-
Add:
have_published(...).from(start)matcher can now assert on events read from particular starting point in stream. This correlates withclient.read.from(start)on client read API [c582f2a] -
Add:
have_published(...).strictandhave_applied(...).strictmatchers to check if only events given as an expectation have been returned and nothing else [6c44cc8, 5e0e548, #119] -
Change: Improve phrasing in documentation format [#358, #355]
-
Change:
have_publishedmatcher now reads stream events forward (from the oldest published) and without limit. Previously we did have a backward read (from the newest published) up to 100 events in order to avoid situation were lastly published event would not fit in (over 100) and not be matched.expect(event_store).to have_published(FooEvent, BarEvent)
should have published events that have to (be a FooEvent and be a BarEvent)
expect(FooEvent.new(data: { foo: "bar" }, metadata: { timestamp: Time.now })) .to(be_event(FooEvent).with_data(foo: "bar") .and(be_event(FooEvent).with_metadata(timestamp: kind_of(Time))))
should be an event FooEvent (with data including {:foo=>"bar"}) and be an event FooEvent (with metadata including {:timestamp=>kind of Time})
BoundedContext
- no changes
RailsEventStore::Browser
- no changes
RubyEventStore::ROM
- no changes
RailsEventStoreActiveRecord::Legacy
- no changes
v0.29.0
RailsEventStore
- Change: Rewrote the middleware so that it now uses
RubyEventStore::Client#with_metadatato enrich published events' metadata when using aRailsEventStore::ClientfromRails.application.config.event_store. By default metadata is enriched withremote_ipandrequest_id, you can set your own lambda inrequest_metadatakeyword argument when initializing a client
RubyEventStore
- Add: Added
RubyEventStore::Client#with_metadatamethod that enriches all events published inside a block with metadata set with method argument.with_metadatacalls can be nested, in such case metadata from all levels are merged - Change: Deprecated
metadata_prockeyword argument inRubyEventStore::Client-with_metadatamethod should be used instead
RailsEventStoreActiveRecord
- no changes
AggregateRoot
- no changes
RailsEventStore::RSpec
-
Fix: Matchers now have
description, making them usable with--format documentation[#127, #282, #326, #342] -
Fix: Matchers now have
failure_message_when_negated, making them usable withexpect(...).not_to[#326, #342]
BoundedContext
- no changes
RailsEventStore::Browser
- no changes
RubyEventStore::ROM
RailsEventStoreActiveRecord::Legacy
- no changes
v0.28.2
RailsEventStore
- no changes
RubyEventStore
- no changes
RailsEventStoreActiveRecord
- no changes
AggregateRoot
- no changes
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RailsEventStore::Browser
- no changes
RubyEventStore::ROM
- no changes
RailsEventStoreActiveRecord::Legacy
v0.28.1
RailsEventStore
RubyEventStore
RailsEventStoreActiveRecord
- no changes
AggregateRoot
- no changes
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RailsEventStore::Browser
- no changes
RubyEventStore::ROM
- no changes
RailsEventStoreActiveRecord::Legacy
- no changes
v0.28.0
RailsEventStore
-
Add: Support Rails 5.2
-
Change: Mappers (and serializers) now operate above the repository layer. If you have custom mapper or serializer move its configuration. [#257]
Was:
RailsEventStore::Client.new( repository: RailsEventStoreActiveRecord::EventRepository.new( mapper: RubyEventStore::Mappers::Default.new( serializer: JSON ) ) )
is now:
RailsEventStore::Client.new( mapper: RubyEventStore::Mappers::Default.new( serializer: JSON ) )
RubyEventStore
-
Change: Mappers (and serializers) now operate above the repository layer. If you have custom mapper or serializer move its configuration. [#257]
Was:
RubyEventStore::Client.new( repository: RailsEventStoreActiveRecord::EventRepository.new( mapper: RubyEventStore::Mappers::Default.new( serializer: JSON ) ) )
is now:
RubyEventStore::Client.new( mapper: RubyEventStore::Mappers::Default.new( serializer: JSON ) )
-
Add:
NullMappermapper. Useful in pair withInMemoryRepositoryfor faster unit tests. Setup and usage in docs [#321] [#240] -
Fixed: Protobuf mapper can be used with async handlers [#228]
-
Fixed: Documented
InMemoryRepositorywhich can be used for faster unit tests [#240] [#321] -
Change:
RubyEventStore#publish_event,RubyEventStore#publish_eventsandRubyEventStore#append_to_streamnow raiseIncorrectStreamDatawhen passednilor empty stream name [#267] -
Breaking: Metadata keys are limited to symbols. Metadata values are limited to
[String, Integer, Float, Date, Time, TrueClass, FalseClass]. UsingHash, 'Array` or custom objects is no longer supported. [#271] -
Breaking: Using protobuf mapper requires manual migration of columns to binary format [#280]
change_column :event_store_events, :data, :binary, null: true change_column :event_store_events, :metadata, :binary, null: true
-
Breaking: Using protobuf mapper requires adding
protobuf_nested_structgem toGemfile[#280] -
Breaking: When using protobuf mapper, the
event_idis no longer stored in event'sdata[#280] -
Breaking: When using protobuf mapper, the
metadatafields are no longer stored in event'sdata[#280] -
Breaking: When using protobuf mapper you need to use
RubyEventStore::Protoclass [#280]Was:
event = MyApp::OrderPlaced.new( event_id: "f90b8848-e478-47fe-9b4a-9f2a1d53622b", customer_id: 123, order_id: "K3THNX9" ) event_store.publish_event(event, stream_name: "Order-K3THNX9")
Is now:
event = RubyEventStore::Proto.new( data: MyApp::OrderPlaced.new( customer_id: 123, order_id: "K3THNX9", ) ) event_store.publish_event(event, stream_name: "Order-K3THNX9")
-
Remove: Custom mappers no longer should implement
add_metadatamethod [#280] -
Remove: Remove API to get all stream names
RubyEventStore::Client#get_all_streams(8d7d3bc) -
Breaking: Custom repositories should expect
RubyEventStore::StreamandRubyEventStore::ExpectedVersionwhere previouslystream_nameandexpected_versionprimitives were passed, in example:Was:
def append_to_stream(events, stream_name, expected_version) # stream_name # expected_version end
Is now:
def append_to_stream(events, stream, expected_version) # stream.name # expected_version.any? end
-
Breaking: Custom repositories are expected to respond to
read(specification)and return anEnumerator. TheRubyEventStore::Specification::Resultstruct describes query conditions. This API replaces previous reader methods on repository [#184]:read_events_forward(stream, after_event_id, count)read_events_backward(stream, before_event_id, count)read_stream_events_forward(stream)read_stream_events_backward(stream)read_all_streams_forward(after_event_id, count)read_all_streams_backward(before_event_id, count)
RailsEventStoreActiveRecord
- Add: Support Rails 5.2
- Remove:
LegacyEventRepositoryhas been moved to separaterails_event_store_active_record-legacygem, not installed as a dependency. SeeRailsEventStoreActiveRecord::Legacysection below. - Remove: Remove API to get all stream names
RailsEventStoreActiveRecord::EventRepository[8d7d3bc] - Change: Restricted access to internal stream
allwith methods not intended to read from global stream. This stream name is an implementation detail ofRailsEventStoreActiveRecord::EventRepositoryrepository and reading from it using non-global stream API might result in different order of events.RubyEventStore::ReservedInternalNameis raised whenread_events_forward('all')is used over desiredread_all_streams_forward.
AggregateRoot
- Change: Dropped dependency on
activesupportgem [#288]
RailsEventStore::RSpec
- Add: Support Rails 5.2
BoundedContext
- Fix: Generate better folders structure [#243]
- Add: Support Rails 5.2
RailsEventStore::Browser
- Add: Support Rails 5.2
- Change: Remove stream names browsing and start with global stream events as a main screen. This is a workaround to avoid problem with inefficient API when browsing huge number of stream names. [#212, #298]
RubyEventStore::ROM
First release of Ruby Object Model (ROM) implementation of events repository for Ruby Event Store. This version of the ROM adapter supports rom-sql at this time. It is an alternative to the Active Record events repository implementation from rails_event_store_active_record gem.
Read the docs to get started.
RailsEventStoreActiveRecord::Legacy
Release of LegacyEventRepository as a separate gem. This repository has been deprecated and is compatible with single-table database schema we no longer support. If you haven't migrated and you're stuck with events repository schema from version below v0.19 then this is your option to defer it a bit more:
require 'rails_event_store_active_record/legacy'
Rails.application.configure do
config.to_prepare do
Rails.configuration.event_store = RailsEventStore::Client.new(
repository: RailsEventStoreActiveRecord::Legacy::EventRepository.new
)
end
endv0.27.1
RailsEventStore
- no changes
RubyEventStore
- no changes
RailsEventStoreActiveRecord
- no changes
AggregateRoot
- no changes
RailsEventStore::RSpec
- no changes
BoundedContext
- no changes
RailsEventStore::Browser
- Fix: Re-release with correctly-built Browser javascript that failed when releasing 0.27.0 (#209)
v0.27.0
RailsEventStore
-
Add: Allows providing custom event mapper #154.
This makes possible to use events which don't inherit from
RailsEventStore::Event. You can now serialize your events however you want: protbuf, messagepack, Apache Avro, BSON, Thrift, Cap’n Proto. It's up to you.Documentation: http://railseventstore.org/docs/mapping_serialization/ and tutorial for using Rails Event Store with Protobuf: http://railseventstore.org/docs/protobuf/ . We are still working on enabling this feature for async handlers
-
Add:
arkency-command_busgem is included in dependencies and automatically installed.Documentation: http://railseventstore.org/docs/command_bus/
-
Change: Async handler powered by ActiveJob no longer require custom configuration: #126
Documentation: http://railseventstore.org/docs/subscribe/
-
Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.
-
Breaking:
RailsEventStore.event_repositoryglobal configuration option was removed. Pass repository as dependency when initializing the client. - #230Rails.application.configure do config.to_prepare do Rails.configuration.event_store = RailsEventStore::Client.new( repository: YourCustomRepository.new ) end end
Documentation: http://railseventstore.org/docs/repository/
RubyEventStore
-
Add: Allow using
ruby_event_storewith repository fromrails_event_store_active_recordwithoutrails- #236Documentation: http://railseventstore.org/docs/without_rails/
-
Add:
ruby_event_storeno longer usesactive_supportas dependency #232 -
Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.
RailsEventStoreActiveRecord
-
Add: Allow using
rails_event_store_active_recordwithoutrails. - #236Documentation: http://railseventstore.org/docs/without_rails/
-
Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.
AggregateRoot
- Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.
RailsEventStore::RSpec
- Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.
BoundedContext
- Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.
RailsEventStore::Browser
- Breaking: We dropped support for Ruby 2.2. It might continue to work, but we no longer test it and we don't guarantee it anymore.