Table of Contents

Class StaticProducerEndpointResolver<TEndpoint, TConfiguration>

Namespace
Silverback.Messaging.Producing.EndpointResolvers
Assembly
Silverback.Integration.dll

Statically resolves to the same destination endpoint (e.g. the target topic and partition) for every message being produced.

public abstract class StaticProducerEndpointResolver<TEndpoint, TConfiguration> : IStaticProducerEndpointResolver<TEndpoint>, IStaticProducerEndpointResolver, IProducerEndpointResolver<TEndpoint>, IProducerEndpointResolver, IEquatable<StaticProducerEndpointResolver<TEndpoint, TConfiguration>> where TEndpoint : ProducerEndpoint where TConfiguration : ProducerEndpointConfiguration

Type Parameters

TEndpoint

The type of the endpoint being resolved.

TConfiguration

The type of the endpoint configuration.

Inheritance
StaticProducerEndpointResolver<TEndpoint, TConfiguration>
Implements
IEquatable<StaticProducerEndpointResolver<TEndpoint, TConfiguration>>
Derived
Inherited Members

Constructors

StaticProducerEndpointResolver(string)

Initializes a new instance of the StaticProducerEndpointResolver<TEndpoint, TConfiguration> class.

protected StaticProducerEndpointResolver(string rawName)

Parameters

rawName string

The raw endpoint name that can be used as RawName.

Properties

RawName

Gets the raw endpoint name that can be used as RawName.

public string RawName { get; }

Property Value

string

Methods

Equals(StaticProducerEndpointResolver<TEndpoint, TConfiguration>?)

public virtual bool Equals(StaticProducerEndpointResolver<TEndpoint, TConfiguration>? other)

Parameters

other StaticProducerEndpointResolver<TEndpoint, TConfiguration>

Returns

bool

Equals(object?)

public override sealed bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetEndpoint(ProducerEndpointConfiguration)

Gets the static destination endpoint.

public ProducerEndpoint GetEndpoint(ProducerEndpointConfiguration configuration)

Parameters

configuration ProducerEndpointConfiguration

The producer endpoint configuration.

Returns

ProducerEndpoint

The ProducerEndpoint.

GetEndpoint(IOutboundEnvelope)

Gets the computed actual destination endpoint for the message being produced.

public ProducerEndpoint GetEndpoint(IOutboundEnvelope envelope)

Parameters

envelope IOutboundEnvelope

The envelope containing the message to be produced.

Returns

ProducerEndpoint

The ProducerEndpoint for the specified message.

GetEndpoint(TConfiguration)

Gets the static destination endpoint.

public TEndpoint GetEndpoint(TConfiguration configuration)

Parameters

configuration TConfiguration

The producer endpoint configuration.

Returns

TEndpoint

The ProducerEndpoint.

GetEndpointCore(TConfiguration)

Gets the static destination endpoint.

protected abstract TEndpoint GetEndpointCore(TConfiguration configuration)

Parameters

configuration TConfiguration

The producer endpoint configuration.

Returns

TEndpoint

The ProducerEndpoint.

Remarks

This method will be called once and the result will be cached.

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(StaticProducerEndpointResolver<TEndpoint, TConfiguration>?, StaticProducerEndpointResolver<TEndpoint, TConfiguration>?)

Equality operator.

public static bool operator ==(StaticProducerEndpointResolver<TEndpoint, TConfiguration>? left, StaticProducerEndpointResolver<TEndpoint, TConfiguration>? right)

Parameters

left StaticProducerEndpointResolver<TEndpoint, TConfiguration>

Left-hand operand.

right StaticProducerEndpointResolver<TEndpoint, TConfiguration>

Right-hand operand.

Returns

bool

operator !=(StaticProducerEndpointResolver<TEndpoint, TConfiguration>?, StaticProducerEndpointResolver<TEndpoint, TConfiguration>?)

Inequality operator.

public static bool operator !=(StaticProducerEndpointResolver<TEndpoint, TConfiguration>? left, StaticProducerEndpointResolver<TEndpoint, TConfiguration>? right)

Parameters

left StaticProducerEndpointResolver<TEndpoint, TConfiguration>

Left-hand operand.

right StaticProducerEndpointResolver<TEndpoint, TConfiguration>

Right-hand operand.

Returns

bool