Skip to content

Commit

Permalink
fix:#701 (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
duiapro authored Mar 19, 2024
1 parent 7012964 commit b34b3b8
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 b34b3b8

Please sign in to comment.