Skip to content

Immutability of event context #290

@deissnerk

Description

@deissnerk

In the discussion of #277 I raised the question, if extension attributes can be changed or added by middleware, or if the event context is immutable. I remember that during the f2f meeting in Copenhagen @clemensv proposed to have two property bags, one for properties added by the source, and one for annotations added by middleware. AFAIK this is quite similar to what AMQP 1.0 supports. If we decide to abandon the idea of property bags for extensions, how do we handle the question of information added to the context by middleware? There are quite a few options:

  1. Don't support information added by middleware. An event is immutable. If anything is changed, it becomes a new event with a new ID.
  2. Allow adding of context attributes by any component on the way.
  3. Add a dedicated property bag for information that is added after event creation. This could be part of the context or on the same level as data and context.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions