Thursday, April 25, 2024
HomeRuby On RailsEasy debugging with these 4 linking lessons from RailsEventStore

Easy debugging with these 4 linking lessons from RailsEventStore


A while in the past I wrote a quick article about simplifying your system debugging by utilizing the linking function of RailsEventStore. The submit is describing customized constructed linking class.

Nevertheless, I forgot to say that RailsEventStore supplies a number of linking lessons out of the field!

At the moment, there are 4 linking lessons:

  • RailsEventStore::LinkByMetadata – hyperlinks occasions to stream constructed on specified metadata key and worth,
  • RailsEventStore::LinkByCorrelationId – hyperlinks occasions to stream by occasion’s correlation id,
  • RailsEventStore::LinkByCausationId – hyperlinks occasions to stream by occasion’s causation id,
  • RailsEventStore::LinkByEventType – hyperlinks occasions to stream by occasion’s kind
    It’s straightforward to make use of. All it’s important to do is so as to add the next 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 to any extent further, you possibly can go to RailsEventStore Browser and browse your occasions by an occasion kind, causation, and correlation ids.

You possibly can learn extra about linking within the docs.



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments