Skip to content

Introduce "version selector" support for Message Handler Registries #3306

@smcvb

Description

@smcvb

Feature Description

All message handlers are paired with a QualifiedName.
Upon subscription of a MessageHandler, it's QualifiedName is required by the respective message type it's registry.

Furthermore, each Message has a so-called MessageType: a combination of the QualifiedName and a version field.
Not that right now, pairing of Message to handler is done solely on the QualifiedName in the MessageType.

However, it would be beneficial if a MessageHandler can dictate a specific version and/or version range for the given QualifiedName it is subscribed for.

Example use case

In doing so, we could for example adapt the MessageHandler to be an in-place upcaster. This idea would hold as the message's payload can be an intermediate format like JSON. Then, if the version range is specified through some to decide upon mechanism, it becomes the message handler's job to upcast the given message.

This solution would not only deprecate the current upcaster support to some extent, it would more importantly allow component-specific upcasting.

Current Behaviour

A MessageHandler and Message are matched based on the QualifiedName used during subscription of the handler and the QualifiedName contained in the MessageType of the Message.

Wanted Behaviour

A MessageHandler can specify a form of VersionRange or VersionSpecifier during subscription, making the handler eligible for a sub-set of message versions.

Possible Workarounds

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority 2: ShouldHigh priority. Ideally, these issues are part of the release they’re assigned to.Type: FeatureUse to signal an issue is completely new to the project.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions