How we can help user with different event versions?

Open
#17 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
ruby

Research direction

Start by reviewing the Hanami::Events.build, subscribe, and broadcast entry points shown in the issue. Clarify how event version metadata should be represented and matched, including the expected behavior for legacy and current subscribers. Done should include an agreed API and coverage for versioned subscriptions and broadcasts.

Written by the indexing model from the issue text.

Description

question

Should we provide some meta information about an event? For example:
We have a legacy system and want to send a new payload in events. We can create something like this:

events = Hanami::Events.build(:kafka)
events.subscribe('*', version: 1.0) { |payload| error 'Old event payload' }
events.subscribe('*', version: 2.0) { |payload| Handler.call(payload) }

events.broadcast('user.updated', version: 2.0, user_id: 1)
Dominant language
Ruby
Stars
41
Forks
6
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hanami/events

All issues in hanami/events

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.