Pārlūkot izejas kodu

Set correlation Id for azure service bus message (#673)

* Update TransportMessage.cs

Added GetCorrelationId to TransportMessage

* Update ITransport.AzureServiceBus.cs

Set CorrelationId for Microsoft.Azure.ServiceBus.Message
master
Henery309 pirms 4 gadiem
committed by GitHub
vecāks
revīzija
01053b1a84
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
2 mainītis faili ar 8 papildinājumiem un 2 dzēšanām
  1. +3
    -2
      src/DotNetCore.CAP.AzureServiceBus/ITransport.AzureServiceBus.cs
  2. +5
    -0
      src/DotNetCore.CAP/Messages/TransportMessage.cs

+ 3
- 2
src/DotNetCore.CAP.AzureServiceBus/ITransport.AzureServiceBus.cs Parādīt failu

@@ -42,7 +42,8 @@ namespace DotNetCore.CAP.AzureServiceBus
{
MessageId = transportMessage.GetId(),
Body = transportMessage.Body,
Label = transportMessage.GetName()
Label = transportMessage.GetName(),
CorrelationId = transportMessage.GetCorrelationId()
};

foreach (var header in transportMessage.Headers)
@@ -86,4 +87,4 @@ namespace DotNetCore.CAP.AzureServiceBus
}
}
}
}
}

+ 5
- 0
src/DotNetCore.CAP/Messages/TransportMessage.cs Parādīt failu

@@ -43,5 +43,10 @@ namespace DotNetCore.CAP.Messages
{
return Headers.TryGetValue(Messages.Headers.Group, out var value) ? value : null;
}
public string GetCorrelationId()
{
return Headers.TryGetValue(Messages.Headers.CorrelationId, out var value) ? value : null;
}
}
}

Notiek ielāde…
Atcelt
Saglabāt