11

Effortless debugging with those 4 linking classes from RailsEventStore

 2 years ago
source link: https://blog.arkency.com/effortless-debugging-with-those-4-linking-classes-from-railseventstore/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Effortless debugging with those 4 linking classes from RailsEventStore Hi, weʼre arkency ?

Some time ago I wrote a short article about simplifying your system debugging by using the linking feature of RailsEventStore. The post is describing custom built linking class.

However, I forgot to mention that RailsEventStore provides a few linking classes out of the box!

Currently, there are 4 linking classes:

  • RailsEventStore::LinkByMetadata - links events to stream built on specified metadata key and value,
  • RailsEventStore::LinkByCorrelationId - links events to stream by event’s correlation id,
  • RailsEventStore::LinkByCausationId - links events to stream by event’s causation id,
  • RailsEventStore::LinkByEventType - links events to stream by event’s type It’s easy to use. All you have to do is to add the following line to your subscriptions:
event_store.subscribe_to_all_events(RailsEventStore::LinkByEventType.new)
event_store.subscribe_to_all_events(RailsEventStore::LinkByCorrelationId.new)
event_store.subscribe_to_all_events(RailsEventStore::LinkByCausationId.new)

And from now on, you can go to RailsEventStore Browser and browse your events by an event type, causation, and correlation ids.

You can read more about linking in the docs.

</article


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK