I have a subscriber who successfully processes the message, then the subscriber successfully publishes another message to indicate that some event has occurred, my problem is that after publication I try to return the message to the sender of the initial message, and the system crashes with the following message
The destination for the NServiceBus.Unicast.Transport.CompletionMessage message is not specified. Message could not be sent. Check the UnicastBusConfig section in the configuration file and verify that MessageEndpointMapping exists for the message type.
The return code is as follows:
Bus.Publish(orderMessage); Bus.Return((int)MySendBus.Core.ErrorCode.Ok);
and app.config looks like this:
<configuration> <configSections> <section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core"/> </configSections> <MsmqTransportConfig InputQueue="MyServerInputQueue" ErrorQueue="error" NumberOfWorkerThreads="1" MaxRetries="5"/> </configuration>
I added the unicast section and still getting the same error. I understand that NServicebus knows how to reply to a message, and I donβt need to specify a queue for a reply to go further than the MsmqTransportConfig input queue found in app.config.
Is it possible for the subscriber to post a message and then respond to the message in which the message was sent?
source share