Interface IEndpointBuilder<TBuilder>
Builds the Endpoint.
Namespace: Silverback.Messaging.Configuration
Assembly: Silverback.Integration.dll
Syntax
public interface IEndpointBuilder<out TBuilder> where TBuilder : IEndpointBuilder<out TBuilder>
Type Parameters
| Name | Description |
|---|---|
| TBuilder | The actual builder type. |
Properties
| Improve this doc View sourceMessageType
Gets the type of the message being produced or consumed.
Declaration
Type? MessageType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Remarks
This value might be used during the configuration to automatically determine some configurations (e.g. the correct serializer to be used) without having to specify the message type once again.
Methods
| Improve this doc View sourceDisableMessageValidation()
Disables the message validation.
Declaration
TBuilder DisableMessageValidation()
Returns
| Type | Description |
|---|---|
| TBuilder | The endpoint builder so that additional calls can be chained. |
UseSerializer(IMessageSerializer)
Specifies the IMessageSerializer to be used serialize or deserialize the messages.
Declaration
TBuilder UseSerializer(IMessageSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMessageSerializer | serializer | The IMessageSerializer. |
Returns
| Type | Description |
|---|---|
| TBuilder | The endpoint builder so that additional calls can be chained. |
ValidateMessage(bool)
Enables the message validation.
Declaration
TBuilder ValidateMessage(bool throwException)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | throwException | A value that specifies whether an exception should be thrown if the message is invalid. |
Returns
| Type | Description |
|---|---|
| TBuilder | The endpoint builder so that additional calls can be chained. |
WithEncryption(EncryptionSettings?)
Enables the end-to-end message encryption.
Declaration
TBuilder WithEncryption(EncryptionSettings? encryptionSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| EncryptionSettings | encryptionSettings | The EncryptionSettings. |
Returns
| Type | Description |
|---|---|
| TBuilder | The endpoint builder so that additional calls can be chained. |
WithName(string)
Specifies an optional friendly name to be used to identify the endpoint. This name can be used to filter or retrieve the endpoints and will also be included in the DisplayName, to be shown in the human-targeted output (e.g. logs, health checks result, etc.).
Declaration
TBuilder WithName(string friendlyName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | friendlyName | The friendly name. |
Returns
| Type | Description |
|---|---|
| TBuilder | The endpoint builder so that additional calls can be chained. |