This reverts the changes done in https://github.com/nats-io/nats.java/pull/1054 which made headers read-only as soon as they the message was constructed (either directly through constructors or via the fluent builder.) This has been reversed.
At publish call time, the entire message is copied and headers made read-only so they cannot be further modified and the protocol is built.
This reverts the changes done in https://github.com/nats-io/nats.java/pull/1054 which made headers read-only as soon as they the message was constructed (either directly through constructors or via the fluent builder.) This has been reversed. At publish call time, the entire message is copied and headers made read-only so they cannot be further modified and the protocol is built.