Struct MessageBrokerPushMessageFinalizer
- Namespace
- LfrlAnvil.MessageBroker.Client
- Assembly
- LfrlAnvil.MessageBroker.Client.dll
Represents an object capable of finalizing the process of pushing previously enqueued message to the server.
public readonly struct MessageBrokerPushMessageFinalizer
- Inherited Members
Properties
Context
MessageBrokerPushContext that created this finalizer.
public MessageBrokerPushContext Context { get; }
Property Value
TraceId
Identifier of an internal trace.
public ulong TraceId { get; }
Property Value
Methods
PushAsync()
Pushes the enqueued message to the publisher's bound channel.
public ValueTask<Result<MessageBrokerPushResult>> PushAsync()
Returns
- ValueTask<Result<MessageBrokerPushResult>>
A task that represents the operation, which returns a Result<T> instance, with underlying MessageBrokerPushResult instance.
Remarks
Unexpected errors encountered during pushing will cause the client to be automatically disposed. Returned Result<T> will only be valid when either the message has been successfully enqueued on the server side, or the publisher is already locally unbound from the channel, which will cancel the request to the server.
Exceptions
- ObjectDisposedException
When Context has been disposed.