NServiceBus icon indicating copy to clipboard operation
NServiceBus copied to clipboard

Some gateway messages do not get sent when mixing convention and key addresses

Open chrisbednarski opened this issue 14 years ago • 4 comments

Bus.SendToSites(new[] { "http://localhost:25899/SiteA/", "SiteB" }, new PriceUpdated
                {
                    ProductId = 2,
                    NewPrice = 100.0,
                    ValidFrom = DateTime.Today
                });

Message is delivered to SiteB only

Problem's in GatewaySender.OnTransportMessageReceived(). CloneAndSendLocal() is called only once

Changing var destinationSites = GetDestinationSitesFor(messageToDispatch); to var destinationSites = GetDestinationSitesFor(messageToDispatch).ToList(); fixes the problem but seems like a hack.

Not sure what the underlying issue is.

chrisbednarski avatar Aug 12 '12 22:08 chrisbednarski

CloneAndSendLocal() overwrites the header of the original TransportMessage. There's some comment in the code about cloning the TransportMessage. Appears to make sense.

chrisbednarski avatar Aug 12 '12 22:08 chrisbednarski

This is already fixed in v4 by the .ToList() call here

chrisbednarski avatar Jun 02 '13 10:06 chrisbednarski

@johnsimons milestone should be 4.0??

SimonCropp avatar Aug 08 '13 04:08 SimonCropp

Yep, updated

johnsimons avatar Aug 08 '13 04:08 johnsimons