瀏覽代碼

Fix topic selector in IConsumerServiceSelector (#806)

Co-authored-by: Andrii Labyntsev <lab.andrii@gmail.com>
master
Andrii Labyntsev 3 年之前
committed by GitHub
父節點
當前提交
17bebe7a2e
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 2 個檔案被更改,包括 1 行新增6 行删除
  1. +0
    -5
      src/DotNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs
  2. +1
    -1
      test/DotNetCore.CAP.Test/CustomConsumerSubscribeTest.cs

+ 0
- 5
src/DotNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs 查看文件

@@ -59,11 +59,6 @@ namespace DotNetCore.CAP.Internal
return null;
}

if (!string.IsNullOrEmpty(_capOptions.TopicNamePrefix))
{
key = $"{_capOptions.TopicNamePrefix}.{key}";
}

var result = MatchUsingName(key, executeDescriptor);
if (result != null)
{


+ 1
- 1
test/DotNetCore.CAP.Test/CustomConsumerSubscribeTest.cs 查看文件

@@ -45,7 +45,7 @@ namespace DotNetCore.CAP.Test
{
var selector = _provider.GetRequiredService<IConsumerServiceSelector>();
var candidates = selector.SelectCandidates();
var bestCandidates = selector.SelectBestCandidate("Candidates.Foo", candidates);
var bestCandidates = selector.SelectBestCandidate($"{TopicNamePrefix}.Candidates.Foo", candidates);

Assert.NotNull(bestCandidates);
Assert.NotNull(bestCandidates.MethodInfo);


Loading…
取消
儲存