Skip to content

Commit

Permalink
Running the gateway sample using SqlTransport & NHGatewayPersister ca…
Browse files Browse the repository at this point in the history
…uses exceptions, #SB-194 fixed
  • Loading branch information
John Simons committed Jul 10, 2013
1 parent 9bb4515 commit 246305e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/NServiceBus.Core/Gateway/HeaderManagement/HeaderMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void Map(TransportMessage from, IDictionary<string,string> to)
to[NServiceBus + TimeToBeReceived] = from.TimeToBeReceived.ToString();
to[NServiceBus + ReplyToAddress] = from.ReplyToAddress.ToString();

SetBackwardsCompatibilityHeaders(from, to);
SetBackwardsCompatibilityHeaders(to);

if (from.Headers.ContainsKey(ReplyToAddress))
to[Headers.RouteTo] = from.Headers[ReplyToAddress];
Expand All @@ -64,9 +64,12 @@ public static void Map(TransportMessage from, IDictionary<string,string> to)
}

[ObsoleteEx(RemoveInVersion = "5.0", TreatAsErrorFromVersion = "5.0")]
static void SetBackwardsCompatibilityHeaders(TransportMessage from, IDictionary<string, string> to)
static void SetBackwardsCompatibilityHeaders(IDictionary<string, string> to)
{
to[NServiceBus + IdForCorrelation] = from.Headers[CorrIdHeader];
if (Configure.HasComponent<MsmqMessageSender>())
{
to[NServiceBus + IdForCorrelation] = to[NServiceBus + CorrelationId];
}
}

[ObsoleteEx(Message = "No need for this in v5", RemoveInVersion = "5.0", TreatAsErrorFromVersion = "5.0")]
Expand Down

0 comments on commit 246305e

Please sign in to comment.