How to configure Apis messaging

For a client such as Apis Tunneler to be able to connect to an remote Apis Hive instance using Apis messaging, you need to enable support of Apis Messaging on the remote Apis instance.

There are two configuration files you need to verify exist in directory '[INSTALLDIR]\Apis\bin':

  1. ApisHive.AppSettings.config - Used to enable or disable Apis messaging for an given Apis instance. A sample file is provided during installation ('Sample-ApisHive.AppSettings.config'), and is located in the same folder. By default, Apis Messaging is enabled for the default Apis Hive instance.

  2. ApisHive.exe.config - Used to define the WCF parameters used by Apis Messaging. This file is created during installation and has support for both http and tcp for the default Apis Hive instance. If you need to support more secure http communications, this can be configured for both the transport and the message.

By default, Apis messaging is enabled for the default Apis Hive instance, supporting both http and netTcp binding through ports 5000 and 6000.

Application settings

To enable Apis Messaging for a custom Apis Hive instance you need to define the binding, the name of the instance, and the port number to use. There are two types of binding supported:

  1. Http - <add key="MessageBroker.baseAddress.other-instance-name.Http" value="http://localhost:5001/Prediktor.Apis.MessageBroker/ApisMessageBrokerSvc"/>
  2. NetTcp - <add key="MessageBroker.baseAddress.other-instance-name.NetTcp" value="net.tcp://localhost:6001/Prediktor.Apis.MessageBroker/ApisMessageBrokerSvc"/>

Configuration settigs

Bindings

This is the default configuration for binding http and netTcp:

Http Bindings with certificate support:

In this sections, http has been replaced to use https for protocol mapping, and security mode has been configured for both transport and message. The client credential type configured is certificate:

Endpoint Behaviors

This is the default configuration for behaviors:

HTTP Behaviors with certificate support:

In this section, the service credentials have been configured to use certificates, and http has been replaced to use https for 'serviceMetadata' (httpsGetEnabled=true)

The name 'nofressc001.prediktor.no' must be replaced with your own server name hosting the certificate.

Services

This is the default configuration for services:

HTTP Services with certificate support:

In addition to the default configuration service endpoints, the endpoint for https has been added (mexHttpsBinding):

Client

This is the default configuration for a client endpoint using http and netTcp

HTTP Client with certificate support:

The information about the client endpoints is fetched from the application settings file.