0

Would somebody be able to explain what the difference is between configuring the EndpointName in Configure.DefineEndpointName and specifying it in the app.config under MessageEndpointMappings?

i.e.

.DefineEndpointName("Something.MessageQueue")

And

 <UnicastBusConfig>
    <MessageEndpointMappings>
      <add Assembly="Something.Messages" Endpoint="Something.MessageQueue" />
    </MessageEndpointMappings>
  </UnicastBusConfig>
TBohnen.jnr
  • 5,117
  • 1
  • 19
  • 26

1 Answers1

1

This sets the name of the current endpoint to "Something.MessageQueue":

.DefineEndpointName("Something.MessageQueue")

This tells the configured endpoint that when sending messages that reside in assembly Something.Messages, the destination endpoint to send them to is "SomethingServer.MessageQueue". I changed the endpoint name in your example to illustrate that they are different endpoints.

<UnicastBusConfig>
    <MessageEndpointMappings>
      <add Assembly="Something.Messages" Endpoint="SomethingServer.MessageQueue" />
    </MessageEndpointMappings>
  </UnicastBusConfig>

I should note that the endpoint names could be the same endpoints if you want to send a message to yourself (which can be useful from time to time).

Edit

Documentation links:

Phil Sandler
  • 27,544
  • 21
  • 86
  • 147
  • Awesome, thanks! Do you know where this is explained in the documentation as I struggled to find anything concrete and concise? – TBohnen.jnr Jan 14 '15 at 18:14