Open Closed

When running the host application which has event bus configuration and it is throwing error #10388


User avatar
0
Hon-Tre_IFS created

Host terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.EventBus.Azure.AbpEventBusAzureModule, Volo.Abp.EventBus.Azure, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null: Value cannot be null. (Parameter 'topicName'). See the inner exception for details. ---> System.ArgumentNullException: Value cannot be null. (Parameter 'topicName') at Volo.Abp.Check.NotNull[T](T value, String parameterName) at Volo.Abp.AzureServiceBus.AzureServiceBusMessageConsumer.Initialize(String topicName, String subscriptionName, String connectionName) at Volo.Abp.AzureServiceBus.AzureServiceBusMessageConsumerFactory.CreateMessageConsumer(String topicName, String subscriptionName, String connectionName) at Volo.Abp.EventBus.Azure.AzureDistributedEventBus.Initialize() at Volo.Abp.EventBus.Azure.AbpEventBusAzureModule.OnApplicationInitialization(ApplicationInitializationContext context) at Volo.Abp.Modularity.AbpModule.OnApplicationInitializationAsync(ApplicationInitializationContext context) at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.InitializeAsync(ApplicationInitializationContext context, IAbpModule module) at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitializationContext context) --- End of inner exception stack trace --- at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitializationContext context) at Volo.Abp.AbpApplicationBase.InitializeModulesAsync() at Volo.Abp.AbpApplicationWithExternalServiceProvider.InitializeAsync(IServiceProvider serviceProvider) at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApplicationAsync(IApplicationBuilder app)


4 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • The exception is thrown by ABP Azure Service Bus distributed event bus initialization because ABP is trying to create an AzureServiceBusMessageConsumer with a null topicName:
    AzureServiceBusMessageConsumer.Initialize(String topicName, String subscriptionName, String connectionName)
      ...
      ArgumentNullException: Value cannot be null. (Parameter 'topicName')
    

    So your host app is starting with Volo.Abp.EventBus.Azure enabled, but the Azure EventBus TopicName is not configured (or not being read).

    • Fix: add (or correct) the Azure Service Bus EventBus configuration in the startup project that crashes (e.g., HttpApi.Host, AuthServer, etc.) appsettings.json / environment-specific file:
    {
        "Azure": {
          "ServiceBus": {
            "Connections": {
              "Default": {
                "ConnectionString": "Endpoint=sb://<yournamespace>.servicebus.windows.net/;SharedAccessKeyName=...;SharedAccessKey=..."
              }
            }
          },
          "EventBus": {
            "ConnectionName": "Default",
            "SubscriberName": "<YourApp_Subscriber>",
            "TopicName": "<YourTopicName>"
          }
        }
      }
    

    Notes (based on how ABP initializes the consumer):

    • Azure:EventBus:TopicName must be non-empty.

    • Azure:EventBus:SubscriberName is also required for subscriptions (keep it non-empty).

    • Azure:EventBus:ConnectionName must match a key under Azure:ServiceBus:Connections.

    • Also ensure you are not accidentally “losing” config values due to environment overrides:

      • If you have appsettings.Development.json, appsettings.Production.json, Kubernetes env vars, etc., confirm none of them overwrite Azure:EventBus:TopicName with an empty value.
      • Confirm you are running the correct project and it has the correct config file copied to output.
    • If you don’t intend to use Azure Service Bus in this host, remove/disable the Azure event bus module from that host’s module dependencies (so AbpEventBusAzureModule doesn’t run). Otherwise ABP will always try to initialize it during application startup.

    Sources (validated):

    • https://abp.io/support/questions/2334

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    Hon-Tre_IFS created

    I am still getting below error. An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.EventBus.Azure.AbpEventBusAzureModule, Volo.Abp.EventBus.Azure, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null: Value cannot be null. (Parameter 'topicName'). See the inner exception for details. ---> System.ArgumentNullException: Value cannot be null. (Parameter 'topicName') below is my configuration

     "Azure": {
       "ServiceBus": {
         "Connections": {
           "Default": {
             "ConnectionString": ""
           }
         }
       }
     },
     "EventBus": {
       "ConnectionName": "Default",
       "SubscriberName": "email-subscription",
       "TopicName": "notification-event"
     },
     "Abp": {
       "EventBus": {
         "Azure": {
           "TopicName": "notification-event",
           "SubscriptionName": "email-subscription",
           "ConnectionName": "Default"
         }
       }
     }
    
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • Your JSON shows two different configuration shapes, but the one ABP’s Azure Event Bus expects is under Azure:EventBus, not top-level EventBus, and not Abp:EventBus:Azure (in your version/module).

    • That’s why ABP still ends up with topicName = null at startup: it’s not reading the keys you think it is.

    Use this exact section (and remove the others to avoid confusion):

    {
      "Azure": {
        "ServiceBus": {
          "Connections": {
            "Default": {
              "ConnectionString": "Endpoint=sb://...;SharedAccessKeyName=...;SharedAccessKey=..."
            }
          }
        },
        "EventBus": {
          "ConnectionName": "Default",
          "SubscriberName": "email-subscription",
          "TopicName": "notification-event"
        }
      }
    }
    

    Then delete these sections entirely (they are not used by Volo.Abp.EventBus.Azure initialization and can mislead you during troubleshooting):

    "EventBus": { ... },
    "Abp": { "EventBus": { "Azure": { ... } } }
    

    Also, in your posted config you have:

    "ConnectionString": ""
    

    Even after fixing TopicName, you will fail later because the connection string is empty. Put a real Azure Service Bus connection string there.

    If you want the host to start without Azure Service Bus at all (e.g., in local dev), you must remove the dependency on Volo.Abp.EventBus.Azure / AbpEventBusAzureModule from that host; otherwise ABP will always try to initialize it on startup.

    (Validated reference relevant to Azure Service Bus EventBus config format used by ABP support)

    • https://abp.io/support/questions/2334

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please try to move EventBus into Azure.

    See https://abp.io/docs/latest/framework/infrastructure/event-bus/distributed/azure?_redirected=B8ABF606AA1BDF5C629883DF1061649A#appsettingsjson-file-configuration

    {
      "Azure": {
        "ServiceBus": {
          "Connections": {
            "Default": {
              "ConnectionString": ""
            }
          }
        },
        "EventBus": {
          "ConnectionName": "",
          "SubscriberName": "",
          "TopicName": ""
        }
      }
    }
    

    Thanks.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on February 05, 2026, 13:24
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.