Class MessagingOptions
Strongly-typed options object bound to the Messaging configuration section. Holds the
per-environment topic and subscription names used by the outbox / message bus, looked up via
case-insensitive name matching.
public sealed class MessagingOptions
- Inheritance
-
MessagingOptions
- Inherited Members
- Extension Methods
Fields
SectionName
Configuration section name (Messaging) that hosts these options.
public const string SectionName = "Messaging"
Field Value
Properties
PrefetchCount
How many unacknowledged messages a RabbitMQ subscription holds at most, the one its handler is running included
(Messaging:PrefetchCount, 1 to 65535, default 16). What a subscription holds beyond the running handler's
message goes back to the queue when it stops, and the broker counts that as a delivery — a message sent back by
enough stops reaches its retry bound sooner — so the bound limits how many messages a stop affects. A higher bound
hides more network latency; the handler still runs one message at a time.
public int PrefetchCount { get; set; }
Property Value
Topics
Configured topics, each carrying its own resolved Value plus per-subscription overrides.
public MessagingOptions.TopicOptions[] Topics { get; set; }
Property Value
Methods
GetSubscription(string, string)
Returns the MessagingOptions.TopicOptions.SubscriptionOptions for a named subscription on a named topic, or null if either is absent.
public MessagingOptions.TopicOptions.SubscriptionOptions? GetSubscription(string topicName, string subscriptionName)
Parameters
Returns
- MessagingOptions.TopicOptions.SubscriptionOptions
The matching subscription entry or null.
GetSubscriptionValue(string, string)
Returns the resolved subscription value for the given topic / subscription pair, or null if either is missing or the value is blank.
public string? GetSubscriptionValue(string topicName, string subscriptionName)
Parameters
Returns
GetTopic(string)
Returns the MessagingOptions.TopicOptions entry whose Name matches
name case-insensitively, or null if absent.
public MessagingOptions.TopicOptions? GetTopic(string name)
Parameters
namestringLogical topic name (e.g.
"Command","EventBundle").
Returns
- MessagingOptions.TopicOptions
The matching topic entry or null.
GetTopicValue(string)
Returns the resolved topic value for name, or null if
the topic is missing or its value is blank.
public string? GetTopicValue(string name)
Parameters
namestringLogical topic name.