Skip to content

Commit

Permalink
fix:#701
Browse files Browse the repository at this point in the history
  • Loading branch information
duiapro committed Mar 19, 2024
1 parent 7012964 commit 9f7a0df
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) MASA Stack All rights reserved.
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.Contrib.Dispatcher.IntegrationEvents.Dapr;
Expand All @@ -19,18 +19,18 @@ public Publisher(IServiceProvider serviceProvider, string pubSubName, string app
_serviceProvider = serviceProvider;
_logger = serviceProvider.GetService<ILogger<Publisher>>();
_pubSubName = pubSubName;
_appId = appId;
_daprAppId = daprAppId;

if (serviceProvider.EnableIsolation())
{
if (_daprAppId.IsNullOrWhiteSpace()) _logger?.LogError("Isolation is enabled but dapr AppId required for integration events is not configured");
if (_daprAppId.IsNullOrWhiteSpace())
_logger?.LogError("Isolation is enabled but dapr AppId required for integration events is not configured");

MasaArgumentException.ThrowIfNullOrWhiteSpace(daprAppId);
}

_appId = appId;
_daprAppId = daprAppId;
}


public async Task PublishAsync<T>(
string topicName,
T @event,
Expand Down

0 comments on commit 9f7a0df

Please sign in to comment.