Class BrokeredMessage
A message envelope.
Inheritance
Inherited Members
Namespace: Kephas.Messaging.Distributed
Assembly: Kephas.Messaging.dll
Syntax
public class BrokeredMessage : IBrokeredMessage, IIdentifiable, IMessageEnvelope, IMessage
Constructors
| Improve this Doc View SourceBrokeredMessage()
Initializes a new instance of the BrokeredMessage class.
Declaration
public BrokeredMessage()
Properties
| Improve this Doc View SourceBearerToken
Gets or sets the bearer token.
Declaration
public string BearerToken { get; set; }
Property Value
Type | Description |
---|---|
System.String | The bearer token. |
Channel
Gets or sets the channel.
Declaration
public string Channel { get; set; }
Property Value
Type | Description |
---|---|
System.String | The channel. |
Content
Gets or sets the message to send.
Declaration
public IMessage Content { get; set; }
Property Value
Type | Description |
---|---|
IMessage | The message to send. |
Id
Gets or sets the identifier for this instance.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
System.String | The identifier. |
IsOneWay
Gets or sets a value indicating whether this message is one way.
Declaration
public bool IsOneWay { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if this message is one way, false if not. |
Properties
Gets or sets the custom properties of the brokered message.
Declaration
public IDictionary<string, object> Properties { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | The custom properties. |
Recipients
Gets or sets the recipients.
Declaration
public IEnumerable<IEndpoint> Recipients { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IEndpoint> | The recipients. |
ReplyToMessageId
Gets or sets the identifier of the message to reply to.
Declaration
public string ReplyToMessageId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The identifier of the reply to message. |
Sender
Gets or sets the sender of the message.
Declaration
public IEndpoint Sender { get; set; }
Property Value
Type | Description |
---|---|
IEndpoint | The message sender. |
Timeout
Gets or sets the timeout when waiting for responses.
Declaration
public TimeSpan? Timeout { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.TimeSpan> | The response timeout. |
Remarks
A value of null
means indefinitely waiting, but
it is strongly discouraged to wait indefinitely for a response.
The default value DefaultTimeout can be used.
Methods
| Improve this Doc View SourceClone(IEnumerable<IEndpoint>)
Makes a deep copy of this object, optionally replacing the existing recipients with the provided ones.
Declaration
public IBrokeredMessage Clone(IEnumerable<IEndpoint> recipients = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IEndpoint> | recipients | Optional. The recipients. |
Returns
Type | Description |
---|---|
IBrokeredMessage | A copy of this object. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIIdentifiable.Id
Gets the identifier.
Declaration
object IIdentifiable.Id { get; }
Returns
Type | Description |
---|---|
System.Object | The identifier. |
IMessageEnvelope.GetContent()
Gets the content message.
Declaration
object IMessageEnvelope.GetContent()
Returns
Type | Description |
---|---|
System.Object | The content message. |