AxonFramework/AxonFramework — Issue #21: Make message MetaData immutable
Author: abuijze
Created: 2011-12-03 14:53:48+00:00
State: open
Labels: Awaits Documentation

**What are the limitations you encounter in the current version? Please provide a simple use-case.**
Messages are often passed along between multiple threads. Some components (especially the Auditing interceptor) depend on the ability to change en Event's MetaData. Immutable objects, however, as much safer to share between threads.

**Please describe the enhancement you would like to have.**
Make MetaData immutable and provide a way to construct a new EventMessage based on an old one, while passing in additional MetaData.

**Do you have any ideas on how to implement the enhancement? If so, any suggestions are welcome.**
A MessageBuilder or copy constructor should do the trick.