Browse Source

Fix topic selector in IConsumerServiceSelector (#806)

Co-authored-by: Andrii Labyntsev <lab.andrii@gmail.com>
master
Andrii Labyntsev 3 years ago
committed by GitHub
parent
commit
17bebe7a2e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions
  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 View File

@@ -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 View File

@@ -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…
Cancel
Save