{"record":{"id":"3c7bc145439995a2","repo":"dotnet/orleans","slug":"azure-event-hub-connection-not-configured-for-stre","errorCode":null,"errorMessage":"Azure Event Hub connection not configured for stream provider options EventHubOptions with name \"{name}\". Use the {options.GetType().Name}.ConfigureEventHubConnection method to configure the connection.","messagePattern":"Azure Event Hub connection not configured for stream provider options EventHubOptions with name \"(.+?)\"\\. Use the (.+?)\\.ConfigureEventHubConnection method to configure the connection\\.","errorType":"validation","errorClass":"OrleansConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubStreamOptions.cs","lineNumber":178,"sourceCode":"                throw new ArgumentException(\"A non-null, non-empty value must be provided.\", nameof(consumerGroup));\n            }\n        }\n    }\n\n    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;","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubStreamOptions.cs#L160-L196","documentation":"Thrown by EventHubOptionsValidator.ValidateConfiguration during silo/client startup when options.CreateConnection is still null, meaning no ConfigureEventHubConnection overload was ever called. The streaming provider cannot function without a connection factory.","triggerScenarios":"Registering a PersistentStreamProvider with EventHub adapter but never invoking ConfigureEventHubConnection on the EventHubOptions for that provider name.","commonSituations":"Missing .ConfigureEventHubConnection(...) call in the stream provider configuration pipeline; configuring on the wrong options name; upgrading to a version that made the connection explicit instead of connection-string-based.","solutions":["Add a .ConfigureEventHubConnection(...) call to the EventHubOptions for the matching provider name.","Verify the options name used in AddEventHubStreams matches the name passed to the validator.","If migrating from connection strings, switch to one of the ConfigureEventHubConnection overloads (instance, endpoint+token, or delegate)."],"exampleFix":"// before\nsiloBuilder.AddEventHubStreams(\"EventHubStream\", c => { /* no ConfigureEventHubConnection */ });\n\n// after\nsiloBuilder.AddEventHubStreams(\"EventHubStream\", c =>\n{\n    c.ConfigureEventHubConnection(\n        new CreateConnectionDelegate(opts => new EventHubConnection(fqdn, hub, credential, opts)),\n        hubName, \"$Default\");\n});","handlingStrategy":"validation","validationCode":"if (options.CreateConnection is null)\n    throw new OrleansConfigurationException(\"Configure EventHub connection before startup.\");","typeGuard":"static bool IsConfigured(EventHubOptions o) => o.CreateConnection is not null;","tryCatchPattern":null,"preventionTips":["Centralize stream provider configuration in a helper that always calls ConfigureEventHubConnection.","Add an integration test that boots the silo to catch misconfiguration before deploy."],"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"}