-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3a367a
commit 9a8efe2
Showing
13 changed files
with
394 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
Source/BSN.Commons/Infrastructure/Kafka/IKafkaConsumerFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
Source/BSN.Commons/Infrastructure/Kafka/IKafkaProducerFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
Source/BSN.Commons/Infrastructure/MessageBroker/Kafka/KafkaConnectionOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
namespace BSN.Commons.Infrastructure.MessageBroker.Kafka | ||
{ | ||
/// <summary> | ||
/// Represents options for configuring a Kafka connection. | ||
/// </summary> | ||
public class KafkaConnectionOptions | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="KafkaConnectionOptions"/> class. | ||
/// </summary> | ||
/// <param name="bootstrapServers"></param> | ||
/// <param name="consumerGroupId"></param> | ||
/// <param name="receiveMessageMaxBytes"></param> | ||
public KafkaConnectionOptions(string bootstrapServers, string consumerGroupId, string receiveMessageMaxBytes) | ||
{ | ||
BootstrapServers = bootstrapServers; | ||
ConsumerGroupId = consumerGroupId; | ||
ReceiveMessageMaxBytes = receiveMessageMaxBytes; | ||
} | ||
|
||
/// <summary> | ||
/// these servers are used to bootstrap the initial connection to the Kafka cluster. | ||
/// it is a list of host/port pairs separated by commas. | ||
/// for example, "broker1:9092,broker2:9092". | ||
/// </summary> | ||
public string BootstrapServers { get; } | ||
|
||
/// <summary> | ||
/// this is a unique string that identifies the consumer group this consumer belongs to. | ||
/// each message sent to a topic is delivered to one consumer instance within each subscribing consumer group. | ||
/// it is useful for parallelism, fault tolerance, and scalability. | ||
/// </summary> | ||
public string ConsumerGroupId { get; } | ||
|
||
/// <summary> | ||
/// the maximum number of bytes in a message batch. | ||
/// </summary> | ||
public string ReceiveMessageMaxBytes { get; } | ||
} | ||
} |
Oops, something went wrong.