{"record":{"id":"beea6e0e20a676ab","repo":"dotnet/orleans","slug":"eventhuboptions-on-stream-provider-this-name-is-beea6e","errorCode":null,"errorMessage":"EventHubOptions on stream provider {this.name} is invalid. EventHubOptions.EventHubName is invalid","messagePattern":"EventHubOptions on stream provider (.+?) is invalid\\. EventHubOptions\\.EventHubName is invalid","errorType":"validation","errorClass":"OrleansConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubStreamOptions.cs","lineNumber":188,"sourceCode":"        {\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        }\n        public void ValidateConfiguration()\n        {\n            var checkpointerFactory = services.GetKeyedService<IStreamQueueCheckpointerFactory>(this.name);\n            if (checkpointerFactory == null)\n                throw new OrleansConfigurationException($\"No IStreamQueueCheckpointer is configured with PersistentStreamProvider {this.name}. Please configure one.\");","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubStreamOptions.cs#L170-L206","documentation":"Thrown by EventHubOptionsValidator.ValidateConfiguration at startup when options.CreateConnection is set but options.EventHubName is null or empty. The provider needs the hub name to address the correct Event Hub.","triggerScenarios":"ConfigureEventHubConnection assigned a delegate but EventHubName was not retained, or a configuration binding left EventHubName empty.","commonSituations":"Using the delegate overload and forgetting to also set EventHubName; config binding to a misnamed key.","solutions":["Set options.EventHubName to the target hub name.","When using the delegate overload ConfigureEventHubConnection(CreateConnectionDelegate, string, string), pass the hub name as the second argument.","Verify the configuration section contains the EventHubName key."],"exampleFix":"// before\noptions.ConfigureEventHubConnection(factory, \"\", consumerGroup);\n\n// after\noptions.ConfigureEventHubConnection(factory, \"my-hub\", consumerGroup);","handlingStrategy":"validation","validationCode":"if (string.IsNullOrEmpty(options.EventHubName))\n    throw new OrleansConfigurationException(\"EventHubName required\");","typeGuard":"static bool HasEventHubName(EventHubOptions o) => !string.IsNullOrEmpty(o.EventHubName);","tryCatchPattern":null,"preventionTips":["Pass the hub name through the delegate overload to keep it in sync.","Assert option values in a startup validation step."],"tags":["eventhubs","configuration","startup","azure","validation"],"backgroundTag":null,"analyzedSha":"fca799fa70ecb6ad975224271703ca43221f58de","analyzedAt":"2026-08-13T19:55:57.938Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}