Skip to content

Commit

Permalink
Changed shared topic name convention for multi-tenancy (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
fraliv13 authored Jan 4, 2021
1 parent f21d42d commit d97f2f7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public class MultiTenancyTopicRegistryDecorator : ITopicRegistry
{
private readonly ITopicRegistry _innerTopicRegistry;
private readonly IOptions<TenancyHostingOptions> _tenancyOptions;
private const string SharedTopicPrefix = "Shared";
private const string TenantTopicPrefix = "Tenant";

public MultiTenancyTopicRegistryDecorator(ITopicRegistry innerTopicRegistry, IOptions<TenancyHostingOptions> tenancyOptions)
Expand Down Expand Up @@ -48,7 +47,7 @@ public string GetTopicPrefix()
switch (_tenancyOptions.Value.TenancyType)
{
case TenancyType.MultiTenant:
return $"{baseTopicPrefix}{TenantTopicPrefix}_{SharedTopicPrefix}.";
return baseTopicPrefix;
case TenancyType.MonoTenant when _tenancyOptions.Value.TenantId.HasValue:
{
//var tenantId = _tenantService.GetTenantIdAsync().GetAwaiter().GetResult();
Expand Down

0 comments on commit d97f2f7

Please sign in to comment.