{"record":{"id":"cd360622638f877e","repo":"dotnet/orleans","slug":"eventhuboptions-on-stream-provider-this-name-is","errorCode":null,"errorMessage":"EventHubOptions on stream provider {this.name} is invalid. EventHubOptions.ConsumerGroup is invalid","messagePattern":"EventHubOptions on stream provider (.+?) is invalid\\. EventHubOptions\\.ConsumerGroup is invalid","errorType":"validation","errorClass":"OrleansConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubStreamOptions.cs","lineNumber":183,"sourceCode":"    public class EventHubOptionsValidator : IConfigurationValidator\n    {\n        private readonly EventHubOptions options;\n        private readonly string name;\n        public EventHubOptionsValidator(EventHubOptions options, string name)\n        {\n            this.options = options;\n            this.name = name;\n        }\n        public void ValidateConfiguration()\n        {\n            if (options.CreateConnection is null)\n            {\n                throw new OrleansConfigurationException($\"Azure Event Hub connection not configured for stream provider options {nameof(EventHubOptions)} with name \\\"{name}\\\". Use the {options.GetType().Name}.{nameof(EventHubOptions.ConfigureEventHubConnection)} method to configure the connection.\");\n            }\n\n            if (string.IsNullOrEmpty(options.ConsumerGroup))\n            {\n                throw new OrleansConfigurationException($\"{nameof(EventHubOptions)} on stream provider {this.name} is invalid. {nameof(EventHubOptions.ConsumerGroup)} is invalid\");\n            }\n\n            if (string.IsNullOrEmpty(options.EventHubName))\n            {\n                throw new OrleansConfigurationException($\"{nameof(EventHubOptions)} on stream provider {this.name} is invalid. {nameof(EventHubOptions.EventHubName)} is invalid\");\n            }\n        }\n    }\n\n    public class StreamCheckpointerConfigurationValidator : IConfigurationValidator\n    {\n        private readonly IServiceProvider services;\n        private readonly string name;\n        public StreamCheckpointerConfigurationValidator(IServiceProvider services, string name)\n        {\n            this.services = services;\n            this.name = name;\n        }","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubStreamOptions.cs#L165-L201","documentation":"Thrown by EventHubOptionsValidator.ValidateConfiguration at startup when options.CreateConnection is set but options.ConsumerGroup is null or empty. The receiver requires a consumer group to attach to a partition.","triggerScenarios":"ConfigureEventHubConnection was called with a consumer group, but a later configuration step (or direct property set) left ConsumerGroup empty before validation.","commonSituations":"Binding EventHubOptions from configuration where the ConsumerGroup key is missing; a custom config builder that overwrites ConsumerGroup with an empty string.","solutions":["Ensure ConsumerGroup is set, typically to \"$Default\".","Validate the configuration binding section for the consumer group key.","Set options.ConsumerGroup explicitly after binding from config."],"exampleFix":"// before\n// config section missing ConsumerGroup -> empty after bind\n\n// after\noptions.ConsumerGroup = config[\"ConsumerGroup\"] ?? \"$Default\";","handlingStrategy":"validation","validationCode":"if (string.IsNullOrEmpty(options.ConsumerGroup))\n    options.ConsumerGroup = \"$Default\";","typeGuard":"static bool HasConsumerGroup(EventHubOptions o) => !string.IsNullOrEmpty(o.ConsumerGroup);","tryCatchPattern":null,"preventionTips":["Always set ConsumerGroup explicitly, even if relying on \"$Default\".","Validate the bound configuration section in a startup filter."],"tags":["eventhubs","configuration","startup","azure","validation"],"backgroundTag":null,"analyzedSha":"fca799fa70ecb6ad975224271703ca43221f58de","analyzedAt":"2026-08-13T19:55:57.938Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}