Class Message

Namespace: redb.Route.Core
Assembly: redb.Route.dll

Default implementation of IMessage.
Holds a payload Body and a dictionary of Headers.

public class Message : IMessage

Inheritance

Object→Message

Implements

Properties

Attachments

Attachments of this message (Apache Camel's AttachmentMessage): named content beside the body, such as the

public IMessageAttachments Attachments { get; }

Body

Message payload. Can be any object or null.

public object? Body { get; set; }

ContentType

MIME content type of the message body (e.g. "application/json").

public string? ContentType { get; set; }

Headers

Headers that travel with the message (ContentType, CorrelationId, custom).

public IDictionary<string, object?> Headers { get; }

Methods

Clone()

Structural copy of the message. Headers get a new dictionary, but the

public IMessage Clone()

GetHeader<T>(string)

Gets a header value with type conversion.

public T? GetHeader<T>(string key)

Snapshot()

Deep, isolated copy for checkpoint/replay: like but the

public IMessage Snapshot()

Constructors

Message()

Creates an empty message.

Message(object?)

Creates a message with the specified body.