Class Endpoint
Represents a message broker endpoint to connect to (such as a Kafka topic or RabbitMQ queue or exchange).
Implements
Inherited Members
Namespace: Silverback.Messaging
Assembly: Silverback.Integration.dll
Syntax
public abstract class Endpoint : IEndpoint
Constructors
| Improve this doc View sourceEndpoint(string)
Initializes a new instance of the Endpoint class.
Declaration
protected Endpoint(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The endpoint name. |
Properties
| Improve this doc View sourceDefaultSerializer
Gets the default serializer (a JsonMessageSerializer with default settings).
Declaration
public static IMessageSerializer DefaultSerializer { get; }
Property Value
| Type | Description |
|---|---|
| IMessageSerializer |
DisplayName
Gets the name to be displayed in the human-targeted output (e.g. logs, health checks result, etc.).
Declaration
public string DisplayName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Encryption
Gets or sets the encryption settings. This optional settings enables the end-to-end message encryption.
When enabled the messages are transparently encrypted by the producer and decrypted by the consumer.
Set it to null (default) to disable this feature.
Declaration
public EncryptionSettings? Encryption { get; set; }
Property Value
| Type | Description |
|---|---|
| EncryptionSettings |
FriendlyName
Gets or sets 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
public string? FriendlyName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MessageValidationMode
Gets or sets the message validation mode. This option can be used to determines if validation has to be performed and if should throw an exception.
Declaration
public MessageValidationMode MessageValidationMode { get; set; }
Property Value
| Type | Description |
|---|---|
| MessageValidationMode |
Name
Gets a string identifying the endpoint (the topic, queue or exchange name).
Declaration
public string Name { get; protected set; }
Property Value
| Type | Description |
|---|---|
| string |
Serializer
Gets or sets the IMessageSerializer to be used to serialize or deserialize the messages being produced or consumed.
Declaration
public IMessageSerializer Serializer { get; set; }
Property Value
| Type | Description |
|---|---|
| IMessageSerializer |
Methods
| Improve this doc View sourceBaseEquals(Endpoint?)
Declaration
protected virtual 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. |
Validate()
Validates the endpoint configuration and throws an EndpointConfigurationException if not valid.
Declaration
public virtual void Validate()