Table of Contents

Interface IMessageChannel

Namespace
Steeltoe.Messaging
Assembly
Steeltoe.Messaging.Abstractions.dll

An abstraction that defines methods for sending messages;

public interface IMessageChannel : IServiceNameAware
Inherited Members

Methods

Send(IMessage)

Send a message to this channel. If the message is sent successfuly, the method returns true. If the message cannot be sent due to a non-fatal reason, the method returns false. The method may also throw a Exception in case of non-recoverable errors. This method may block indefinitely, depending on the implementation.

bool Send(IMessage message)

Parameters

message IMessage

the message to send

Returns

bool

true if the message is sent

Send(IMessage, int)

Send a message, blocking until either the message is accepted or the specified timeout period elapses.

bool Send(IMessage message, int timeout)

Parameters

message IMessage

the message to send

timeout int

the timeout in milliseconds; -1 for no timeout

Returns

bool

true if the message is sent

SendAsync(IMessage, CancellationToken)

Send a message to this channel.

ValueTask<bool> SendAsync(IMessage message, CancellationToken cancellationToken = default)

Parameters

message IMessage

the message to send

cancellationToken CancellationToken

token used to signal cancellation

Returns

ValueTask<bool>

a task to signal completion