Table of Contents

Struct MessageBrokerClientOptions

Namespace
LfrlAnvil.MessageBroker.Client
Assembly
LfrlAnvil.MessageBroker.Client.dll

Represents available MessageBrokerClient creation options.

public readonly record struct MessageBrokerClientOptions : IEquatable<MessageBrokerClientOptions>
Implements
Inherited Members

Constructors

MessageBrokerClientOptions(MessageBrokerClientTcpOptions, MessageBrokerClientNetworkPacketOptions, MemorySize?, Duration?, Duration?, Duration?, Duration?, bool?, bool?, bool?, ITimestampProvider?, ValueTaskDelaySource?, MessageBrokerClientLogger?, MessageBrokerClientStreamDecorator?)

Represents available MessageBrokerClient creation options.

public MessageBrokerClientOptions(MessageBrokerClientTcpOptions Tcp, MessageBrokerClientNetworkPacketOptions NetworkPacket, MemorySize? MinMemoryPoolSegmentLength, Duration? ConnectionTimeout, Duration? DesiredMessageTimeout, Duration? DesiredPingInterval, Duration? ListenerDisposalTimeout, bool? SynchronizeExternalObjectNames, bool? ClearBuffers, bool? IsEphemeral, ITimestampProvider? Timestamps, ValueTaskDelaySource? DelaySource, MessageBrokerClientLogger? Logger, MessageBrokerClientStreamDecorator? StreamDecorator)

Parameters

Tcp MessageBrokerClientTcpOptions

Available TcpClient options.

NetworkPacket MessageBrokerClientNetworkPacketOptions

Available network packet options.

MinMemoryPoolSegmentLength MemorySize?

Minimum segment length of an underlying MemoryPool<T>. Equal to 16 KB by default. Value will be clamped to [16384 B, 2147483647 B] range.

ConnectionTimeout Duration?

Connect to server timeout. Equal to 15 seconds by default. Sub-millisecond components will be trimmed. Value will be clamped to [1 ms, 2147483647 ms] range.

DesiredMessageTimeout Duration?

Desired send or receive message timeout. Equal to 15 seconds by default. Actual timeout will be negotiated with the server during handshake. Sub-millisecond components will be trimmed. Value will be clamped to [1 ms, 2147483647 ms] range.

DesiredPingInterval Duration?

Desired send ping interval. Equal to 15 seconds by default. Actual interval will be negotiated with the server during handshake. Sub-millisecond components will be trimmed. Value will be clamped to [1 ms, 24 hours] range.

ListenerDisposalTimeout Duration?

Amount of time that MessageBrokerListener instances will wait during their disposal for callbacks to complete before giving up. Equal to 15 seconds by default. Sub-millisecond components will be trimmed. Value will be clamped to [1 ms, 2147483647 ms] range.

SynchronizeExternalObjectNames bool?

Specifies whether synchronization of external object names is enabled. Equal to true by default.

ClearBuffers bool?

Specifies whether to clear internal buffers once the client is done using them. Equal to false by default.

IsEphemeral bool?

Specifies whether the client should be ephemeral. Non-ephemeral clients will be persisted by the server when offline. Equal to true by default.

Timestamps ITimestampProvider

Timestamp provider.

DelaySource ValueTaskDelaySource

ValueTaskDelaySource instance used for scheduling future events.

Logger MessageBrokerClientLogger?

MessageBrokerClientLogger instance.

StreamDecorator MessageBrokerClientStreamDecorator

MessageBrokerClientStreamDecorator callback.

Properties

ClearBuffers

Specifies whether to clear internal buffers once the client is done using them. Equal to false by default.

public bool? ClearBuffers { get; init; }

Property Value

bool?

ConnectionTimeout

Connect to server timeout. Equal to 15 seconds by default. Sub-millisecond components will be trimmed. Value will be clamped to [1 ms, 2147483647 ms] range.

public Duration? ConnectionTimeout { get; init; }

Property Value

Duration?

Default

Represents default options.

public static MessageBrokerClientOptions Default { get; }

Property Value

MessageBrokerClientOptions

DelaySource

ValueTaskDelaySource instance used for scheduling future events.

public ValueTaskDelaySource? DelaySource { get; init; }

Property Value

ValueTaskDelaySource

DesiredMessageTimeout

Desired send or receive message timeout. Equal to 15 seconds by default. Actual timeout will be negotiated with the server during handshake. Sub-millisecond components will be trimmed. Value will be clamped to [1 ms, 2147483647 ms] range.

public Duration? DesiredMessageTimeout { get; init; }

Property Value

Duration?

DesiredPingInterval

Desired send ping interval. Equal to 15 seconds by default. Actual interval will be negotiated with the server during handshake. Sub-millisecond components will be trimmed. Value will be clamped to [1 ms, 24 hours] range.

public Duration? DesiredPingInterval { get; init; }

Property Value

Duration?

IsEphemeral

Specifies whether the client should be ephemeral. Non-ephemeral clients will be persisted by the server when offline. Equal to true by default.

public bool? IsEphemeral { get; init; }

Property Value

bool?

ListenerDisposalTimeout

Amount of time that MessageBrokerListener instances will wait during their disposal for callbacks to complete before giving up. Equal to 15 seconds by default. Sub-millisecond components will be trimmed. Value will be clamped to [1 ms, 2147483647 ms] range.

public Duration? ListenerDisposalTimeout { get; init; }

Property Value

Duration?

Logger

public MessageBrokerClientLogger? Logger { get; init; }

Property Value

MessageBrokerClientLogger?

MinMemoryPoolSegmentLength

Minimum segment length of an underlying MemoryPool<T>. Equal to 16 KB by default. Value will be clamped to [16384 B, 2147483647 B] range.

public MemorySize? MinMemoryPoolSegmentLength { get; init; }

Property Value

MemorySize?

NetworkPacket

Available network packet options.

public MessageBrokerClientNetworkPacketOptions NetworkPacket { get; init; }

Property Value

MessageBrokerClientNetworkPacketOptions

StreamDecorator

public MessageBrokerClientStreamDecorator? StreamDecorator { get; init; }

Property Value

MessageBrokerClientStreamDecorator

SynchronizeExternalObjectNames

Specifies whether synchronization of external object names is enabled. Equal to true by default.

public bool? SynchronizeExternalObjectNames { get; init; }

Property Value

bool?

Tcp

Available TcpClient options.

public MessageBrokerClientTcpOptions Tcp { get; init; }

Property Value

MessageBrokerClientTcpOptions

Timestamps

Timestamp provider.

public ITimestampProvider? Timestamps { get; init; }

Property Value

ITimestampProvider

Methods

SetClearBuffers(bool?)

Allows to change ClearBuffers.

[Pure]
public MessageBrokerClientOptions SetClearBuffers(bool? value)

Parameters

value bool?

New value

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetConnectionTimeout(Duration?)

Allows to change ConnectionTimeout.

[Pure]
public MessageBrokerClientOptions SetConnectionTimeout(Duration? value)

Parameters

value Duration?

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetDelaySource(ValueTaskDelaySource?)

Allows to change DelaySource.

[Pure]
public MessageBrokerClientOptions SetDelaySource(ValueTaskDelaySource? value)

Parameters

value ValueTaskDelaySource

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetDesiredMessageTimeout(Duration?)

Allows to change DesiredMessageTimeout.

[Pure]
public MessageBrokerClientOptions SetDesiredMessageTimeout(Duration? value)

Parameters

value Duration?

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetDesiredPingInterval(Duration?)

Allows to change DesiredPingInterval.

[Pure]
public MessageBrokerClientOptions SetDesiredPingInterval(Duration? value)

Parameters

value Duration?

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetEphemeral(bool?)

Allows to change IsEphemeral.

[Pure]
public MessageBrokerClientOptions SetEphemeral(bool? value)

Parameters

value bool?

New value

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetListenerDisposalTimeout(Duration?)

Allows to change ListenerDisposalTimeout.

[Pure]
public MessageBrokerClientOptions SetListenerDisposalTimeout(Duration? value)

Parameters

value Duration?

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetLogger(MessageBrokerClientLogger?)

Allows to change Logger.

[Pure]
public MessageBrokerClientOptions SetLogger(MessageBrokerClientLogger? value)

Parameters

value MessageBrokerClientLogger?

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetMinMemoryPoolSegmentLength(MemorySize?)

Allows to change MinMemoryPoolSegmentLength.

[Pure]
public MessageBrokerClientOptions SetMinMemoryPoolSegmentLength(MemorySize? value)

Parameters

value MemorySize?

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetNetworkPacketOptions(MessageBrokerClientNetworkPacketOptions)

Allows to change NetworkPacket.

[Pure]
public MessageBrokerClientOptions SetNetworkPacketOptions(MessageBrokerClientNetworkPacketOptions value)

Parameters

value MessageBrokerClientNetworkPacketOptions

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetStreamDecorator(MessageBrokerClientStreamDecorator?)

Allows to change StreamDecorator.

[Pure]
public MessageBrokerClientOptions SetStreamDecorator(MessageBrokerClientStreamDecorator? value)

Parameters

value MessageBrokerClientStreamDecorator

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetSynchronizeExternalObjectNames(bool?)

[Pure]
public MessageBrokerClientOptions SetSynchronizeExternalObjectNames(bool? value)

Parameters

value bool?

New value

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetTcpOptions(MessageBrokerClientTcpOptions)

Allows to change Tcp.

[Pure]
public MessageBrokerClientOptions SetTcpOptions(MessageBrokerClientTcpOptions value)

Parameters

value MessageBrokerClientTcpOptions

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.

SetTimestamps(ITimestampProvider?)

Allows to change Timestamps.

[Pure]
public MessageBrokerClientOptions SetTimestamps(ITimestampProvider? value)

Parameters

value ITimestampProvider

New value.

Returns

MessageBrokerClientOptions

New MessageBrokerClientOptions instance.