Skip to content

Commit

Permalink
Support for wildcards in gateway channel uris
Browse files Browse the repository at this point in the history
  • Loading branch information
janovesk committed Aug 31, 2017
1 parent 1a19699 commit bfcaf4a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Snippets/Gateway/Gateway_2/Channels/Wildcard.config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
<GatewayConfig>
<Channels>
<Channel Address="http://+:25899/RemoteSite/"
ChannelType="Http"/>
<Channel Address="http://gateway.mycorp.com:25899/RemoteSite/"
ChannelType="Http"
Default="true"/>
Default="true"/>
</Channels>
</GatewayConfig>
</configuration>
Expand Down
4 changes: 3 additions & 1 deletion nservicebus/gateway/multi-site-deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,6 @@ Then at configuration time:
snippet: UseCustomConfigurationSourceForGatewayChannelsConfig


The `Default = true` on the first channel config entry tells the gateway which address to attach to outgoing messages if the sender does not specify it explicitly. Any number of channels can be added.
The `Default = true` on the first channel config entry tells the gateway which address to attach to outgoing messages if the sender does not specify it explicitly. Any number of channels can be added.

partial: wildcard
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Incoming channels with wildcard uris

Hosting in a dynamic environment, like Azure Service Fabric, can make it difficult to find the correct hostname to bind incoming channels too. Incoming channels with wildcard uris are supported from version 2.0.1 of the gateway to support this scenario.

The supported format is `http://+:port/{name of the endpoint}`. `http://+:25899/` will listen on port 25899 on any ip/hostname available on the machine.

The channel uri is used to populate the ReplyTo header of any messages sent by the gateway instance. Using a wildcard in the `ReplyTo` header makes little sense as it would not be routable back from a replying gateway. An additional default channel with a fully qualified uri is therefore required whenever incoming channels with wildcard uris are used. The default channel uri will be used in the `ReplyTo` header of any message sent.

#### Example
snippet: configureWildcardGatewayChannel

0 comments on commit bfcaf4a

Please sign in to comment.