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
TEndpointThe type of the endpoint being resolved.
TConfigurationThe type of the endpoint configuration.
- Inheritance
-
StaticProducerEndpointResolver<TEndpoint, TConfiguration>
- Implements
-
IStaticProducerEndpointResolver<TEndpoint>IProducerEndpointResolver<TEndpoint>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
Properties
RawName
Gets the raw endpoint name that can be used as RawName.
public string RawName { get; }
Property Value
Methods
Equals(StaticProducerEndpointResolver<TEndpoint, TConfiguration>?)
public virtual bool Equals(StaticProducerEndpointResolver<TEndpoint, TConfiguration>? other)
Parameters
otherStaticProducerEndpointResolver<TEndpoint, TConfiguration>
Returns
Equals(object?)
public override sealed bool Equals(object? obj)
Parameters
objobject
Returns
GetEndpoint(ProducerEndpointConfiguration)
Gets the static destination endpoint.
public ProducerEndpoint GetEndpoint(ProducerEndpointConfiguration configuration)
Parameters
configurationProducerEndpointConfigurationThe producer endpoint configuration.
Returns
GetEndpoint(IOutboundEnvelope)
Gets the computed actual destination endpoint for the message being produced.
public ProducerEndpoint GetEndpoint(IOutboundEnvelope envelope)
Parameters
envelopeIOutboundEnvelopeThe 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
configurationTConfigurationThe producer endpoint configuration.
Returns
- TEndpoint
The ProducerEndpoint.
GetEndpointCore(TConfiguration)
Gets the static destination endpoint.
protected abstract TEndpoint GetEndpointCore(TConfiguration configuration)
Parameters
configurationTConfigurationThe 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
Operators
operator ==(StaticProducerEndpointResolver<TEndpoint, TConfiguration>?, StaticProducerEndpointResolver<TEndpoint, TConfiguration>?)
Equality operator.
public static bool operator ==(StaticProducerEndpointResolver<TEndpoint, TConfiguration>? left, StaticProducerEndpointResolver<TEndpoint, TConfiguration>? right)
Parameters
leftStaticProducerEndpointResolver<TEndpoint, TConfiguration>Left-hand operand.
rightStaticProducerEndpointResolver<TEndpoint, TConfiguration>Right-hand operand.
Returns
operator !=(StaticProducerEndpointResolver<TEndpoint, TConfiguration>?, StaticProducerEndpointResolver<TEndpoint, TConfiguration>?)
Inequality operator.
public static bool operator !=(StaticProducerEndpointResolver<TEndpoint, TConfiguration>? left, StaticProducerEndpointResolver<TEndpoint, TConfiguration>? right)
Parameters
leftStaticProducerEndpointResolver<TEndpoint, TConfiguration>Left-hand operand.
rightStaticProducerEndpointResolver<TEndpoint, TConfiguration>Right-hand operand.