Skip to content

Commit c8bfa92

Browse files
committed
adding servicebus options
1 parent 51b335e commit c8bfa92

3 files changed

Lines changed: 38 additions & 2 deletions

File tree

src/CodeChavez.EventBus.Abstractions/CodeChavez.EventBus.Abstractions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Title>CodeChavez EventBus Abstractions Library</Title>
1010
<Authors>Victor A Chavez</Authors>
1111
<Product>CodeChavez.EventBus.Abstractions</Product>
12-
<Version>10.0.0-preview6</Version>
12+
<Version>10.0.0-preview7</Version>
1313
<Copyright>2020-2026</Copyright>
1414
<Description>It has all necessary interfaces to be implemented</Description>
1515
<PackageReadmeFile>README.md</PackageReadmeFile>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.ComponentModel.DataAnnotations;
2+
3+
namespace CodeChavez.EventBus.Abstractions.Configurations;
4+
5+
public record ServiceBusOptions
6+
{
7+
public string ConnecitonString { get; set; } = string.Empty;
8+
9+
/// <summary>
10+
/// The number of messages to prefetch from the broker in each poll. Must be between 1 and 10,000. Default is 5000.
11+
/// </summary>
12+
[Range(1, 10_000)]
13+
public ushort PrefetchCount { get; set; } = 5000;
14+
15+
/// <summary>
16+
/// The maximum number of messages to process in a single batch. Must be between 1 and 10,000. Default is 1000.
17+
/// </summary>
18+
[Range(1, 10_000)]
19+
public ushort BatchSize { get; set; } = 1000;
20+
21+
/// <summary>
22+
/// A unique identifier for the client instance.
23+
/// </summary>
24+
public string ClientId { get; set; } = DateTime.UtcNow.Ticks.ToString();
25+
26+
/// <summary>
27+
/// The consumer group ID to use when consuming messages. This should be the same for all instances of the consumer that are part of the same group, allowing them to share the load of processing messages from the topic.
28+
/// </summary>
29+
public string ConsumerGroup { get; set; } = string.Empty;
30+
31+
/// <summary>
32+
/// The topic to subscribe to for consuming messages. This should match the topic that producers are publishing to.
33+
/// </summary>
34+
public required string Topic { get; set; } = string.Empty;
35+
36+
}

src/CodeChavez.EventBus.EventHub/CodeChavez.EventBus.EventHub.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Title>CodeChavez EventBus EventHub Library</Title>
1010
<Authors>Victor A Chavez</Authors>
1111
<Product>CodeChavez.EventBus.EventHub</Product>
12-
<Version>10.0.0-preview6</Version>
12+
<Version>10.0.0-preview7</Version>
1313
<Copyright>2026 Victor A Chavez</Copyright>
1414
<Description>Stuff to connect to Azure EventHub as a consumer or producer plus subcriptions</Description>
1515
<PackageReadmeFile>README.md</PackageReadmeFile>

0 commit comments

Comments
 (0)