Skip to content

Configuring Client Access

There are two ways programmers using the Neuron API can configure the Party’s connection to the esb server. The first way is to use an application configuration file with the appropriate entries. The second way is to use the SubscriberConfiguration object.

Configuration File

The default constructor for the Party object will use settings from the application configuration file to determine the location of the Neuron server. The following appSettings values must be specified in the application configuration file:

    <add key="esbServiceAddress" value="net.tcp://localhost:50000"/>
    <add key="esbZone" value="Enterprise"/>
esbServiceAddressSpecifies the address of the Neuron bootstrap service. The default port for the bootstrap service is 50000. When using a load balancer with Neuron, this URL should point to the load balancer rather than an individual server.
esbZoneSpecifies the regional zone which the application should use. Neuron creates a default zone called Enterprise when a new configuration is created.
esbServiceIdentityOptional. Specifies the identity used by Neuron.

Programmatic Configuration

In situations where an application must be able to connect to more than ESB server or cluster and in cases where a configuration file is not desired, a Party can be created by explicitly passing connection information with a SubscriberConfiguration object.

using (Party party = new Party(new SubscriberConfiguration(partyId, 
  zone, bootstrapUrl, identity)))
     // Connect and start sending messages

Additional information about the SubscriberConfiguration class can be found in the API Reference.

Was this article helpful?
Dislike 0
Next: Installing the Neuron ESB SDK with NuGet