Skip to content

Pass all messages through the event bus#1865

Open
brasmusson wants to merge 1 commit intomainfrom
feature/messages-in-event-bus
Open

Pass all messages through the event bus#1865
brasmusson wants to merge 1 commit intomainfrom
feature/messages-in-event-bus

Conversation

@brasmusson
Copy link
Copy Markdown
Contributor

Description

Make the MessageBuilder a mandatory formatter and let it pass the created message to the event bus. Users of the message stream then only have to register for on_envelope on the event bus to get the full message stream.

Previously only the messages produced by the gherkin library have been passed though the event bus. This change is a step to completely replace the event other than messages with messages.

After this change event users, mainly formatters, can be updated to use messages without having to inherit from MessageBuilder - which is a kind of hack - but to use the final design of registering for the message stream in the event bus.

When most or all event users have be updated to use message. Event producers can be change to produce messages instead. Then MessageBuilder need to be updated to not convert those messages from events. Finally MessageBuilder can be completely removed.

Type of change

Please delete options that are not relevant.

  • Refactoring (improvements to code design or tooling that don't change behaviour)

Please add an entry to the relevant section of CHANGELOG.md as part of this pull request.

Checklist:

Your PR is ready for review once the following checklist is
complete. You can also add some checks if you want to.

  • Tests have been added for any changes to behaviour of the code
  • New and existing tests are passing locally and on CI
  • bundle exec rubocop reports no offenses
  • RDoc comments have been updated
  • CHANGELOG.md has been updated

* Make the MessageBuilder a mandatory formatter and let it pass the
  created message to the event bus. Users of the message stream then
  only have to register for on_envelope on the event bus to get the
  full message stream.
@luke-hill
Copy link
Copy Markdown
Contributor

When most or all event users have be updated to use message. Event producers can be change to produce messages instead. Then MessageBuilder need to be updated to not convert those messages from events. Finally MessageBuilder can be completely removed.

I spoke with Rien about this on thursday. This is something I think is something we should do, but it sounds hard.

Step 1 I'm going to produce a mapping doc probably as an issue detailing which events map 1->1, which events don't map, and which messages don't have a mapping event source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants