Class ProducerEndpoint
Represents a message broker endpoint to produce to (such as a Kafka topic or RabbitMQ queue or exchange).
Inheritance
Inherited Members
Namespace: Silverback.Messaging
Assembly: Silverback.Integration.dll
Syntax
public abstract class ProducerEndpoint : Endpoint, IProducerEndpoint, IEndpoint
Constructors
| Improve this doc View sourceProducerEndpoint(Func<IOutboundEnvelope, IServiceProvider, string?>)
Initializes a new instance of the ProducerEndpoint class.
Declaration
protected ProducerEndpoint(Func<IOutboundEnvelope, IServiceProvider, string?> nameFunction)
Parameters
Type | Name | Description |
---|---|---|
Func<IOutboundEnvelope, IServiceProvider, string> | nameFunction | The function returning the topic name for the message being produced. If the function returns
|
ProducerEndpoint(Func<IOutboundEnvelope, string?>)
Initializes a new instance of the ProducerEndpoint class.
Declaration
protected ProducerEndpoint(Func<IOutboundEnvelope, string?> nameFunction)
Parameters
Type | Name | Description |
---|---|---|
Func<IOutboundEnvelope, string> | nameFunction | The function returning the topic name for the message being produced. If the function returns
|
ProducerEndpoint(string)
Initializes a new instance of the ProducerEndpoint class.
Declaration
protected ProducerEndpoint(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The endpoint name. |
ProducerEndpoint(string, Func<IOutboundEnvelope, string[]>)
Initializes a new instance of the ProducerEndpoint class.
Declaration
protected ProducerEndpoint(string nameFormat, Func<IOutboundEnvelope, string[]> argumentsFunction)
Parameters
Type | Name | Description |
---|---|---|
string | nameFormat | The endpoint name format string that will be combined with the arguments returned by the
|
Func<IOutboundEnvelope, string[]> | argumentsFunction | The function returning the arguments to be used to format the string. |
ProducerEndpoint(Type)
Initializes a new instance of the ProducerEndpoint class.
Declaration
protected ProducerEndpoint(Type resolverType)
Parameters
Type | Name | Description |
---|---|---|
Type | resolverType | The type of the IProducerEndpointNameResolver to be used to resolve the actual endpoint name. |
Properties
| Improve this doc View sourceChunk
Gets or sets the message chunking settings. This option can be used to split large messages into smaller chunks.
Declaration
public ChunkSettings? Chunk { get; set; }
Property Value
Type | Description |
---|---|
ChunkSettings |
MessageEnrichers
Gets or sets the collection of IOutboundMessageEnricher to be used to enrich the outbound message.
Declaration
public ICollection<IOutboundMessageEnricher> MessageEnrichers { get; set; }
Property Value
Type | Description |
---|---|
ICollection<IOutboundMessageEnricher> |
Strategy
Gets or sets the strategy to be used to produce the messages. If no strategy is specified, the messages will be sent to the message broker directly.
Declaration
public IProduceStrategy Strategy { get; set; }
Property Value
Type | Description |
---|---|
IProduceStrategy |
Methods
| Improve this doc View sourceBaseEquals(Endpoint?)
Declaration
protected override bool BaseEquals(Endpoint? other)
Parameters
Type | Name | Description |
---|---|---|
Endpoint | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | Returns a value indicating whether the other object is equal to the current object. |
Overrides
| Improve this doc View sourceGetActualName(IOutboundEnvelope, IServiceProvider)
Gets the actual target endpoint name for the message being produced.
Declaration
public string? GetActualName(IOutboundEnvelope envelope, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IOutboundEnvelope | envelope | The envelope containing the message being produced. |
IServiceProvider | serviceProvider | The IServiceProvider in the current scope. |
Returns
Type | Description |
---|---|
string | The actual name of the endpoint to be produced to. |
Validate()
Validates the endpoint configuration and throws an EndpointConfigurationException if not valid.
Declaration
public override void Validate()