Record Class MessageHeader
java.lang.Object
java.lang.Record
org.j7m.middleware.api.messaging.MessageHeader
- Record Components:
metadata- safe metadata map
- All Implemented Interfaces:
Serializable
Safe public metadata attached to a durable queue message.
The record is immutable, serializable, and thread-safe. Implementations must preserve this metadata through durable enqueue, outbox recording, and recovery. Header keys and values are intended for routing and diagnostics and must not contain raw payload data or secrets.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMessageHeader(Map<String, String> metadata) Creates validated message header metadata. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageHeaderempty()Returns an empty immutable header.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MessageHeader
Creates validated message header metadata.- Throws:
IllegalArgumentException- when a key or value is blank, too long, or not log-safe
-
-
Method Details
-
empty
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
metadata
-