Configuration

InEngine.NET is configured with a JSON file called IntegrationEngine.json. The configuration file has several sections, outlined below.

WebApi

The WebApi section contains settings for the InEngine.NET's WebApi. Namely, the hostname and port of the web API. A list of CORS origins can also be specified. This is useful when accessing the API via the browser with the InEngine.NET Dashboard. Note that it is not recommended to use "*" wildcard, but a list of specific domains is preferred instead.

{
    // ...
    "WebApi": {
        "HostName": "localhost",
        "Port": 9001,
        "Origins": ["*"]
    },
    // ...
}

NLogAdapter

The NLogAdapter section contains settings for configuring the NLog Common.Logging adapter.

{
    // ...
    "NLogAdapter": {
        "ConfigType": "File",
        "ConfigFile": "IntegrationEngine.nlog.xml"
    }
    // ..
}

Integration Points

Any number of integration points Integration Points can be configured. All integration points should have a unique name defined in its IntegrationPointName property.

RabbitMQ

The RabbitMQ section contains settings for connecting to a RabbitMQ server. If these settings are not correct, then a connection exception will be thrown when a job is triggered.

A queue called "myqueue" will not exist on a freshly installed RabbitMQ server. It will need to be created.

{
    // ...
    "IntegrationPoints": {
        "RabbitMQ": [
            {
                "IntegrationPointName": "DefaultRabbitMQ",
                "QueueName": "myqueue",
                "ExchangeName": "amq.direct",
                "UserName": "inengine",
                "Password": "secret",
                "HostName": "localhost",
                "VirtualHost": "/"
            }
        ],
    }
    // ...
}

Elasticsearch

The Elasticsearch section contains settings for connecting to a Elasticsearch server. If these settings are not correct, then a connection exception will be thrown when a job is scheduled.

{
    // ...
    "IntegrationPoints": {
        "Elasticsearch": [
            {
                "IntegrationPointName": "DefaultElasticsearch",
                "Protocol": "http",
                "HostName": "localhost",
                "Port": 9200,
                "DefaultIndex": "integration-engine"
            }
        ]
    }
    // ...
}

Mail

The Mail section contains settings for connecting to an SMTP server. If these settings are not correct, then a connection exception will be thrown when sending an email.

{
    // ...
    "IntegrationPoints": {
        "Mail": [
            {
                "IntegrationPointName": "DefaultMail",
                "HostName": "localhost",
                "Port": 25
            }
        ]
    }
    // ...
}

Sample Configuration

This is a sample minimum configuration.

{
    "WebApi": {
        "HostName": "localhost",
        "Port": 9001,
        "Origins": ["*"]
    },
    "NLogAdapter": {
        "ConfigType": "File",
        "ConfigFile": "IntegrationEngine.nlog.xml"
    },
    "IntegrationPoints": {
        "RabbitMQ": [
            {
                "IntegrationPointName": "DefaultRabbitMQ",
                "QueueName": "myqueue",
                "ExchangeName": "amq.direct",
                "UserName": "inengine",
                "Password": "secret",
                "HostName": "localhost",
                "VirtualHost": "/"
            }
        ],
        "Elasticsearch": [
            {
                "IntegrationPointName": "DefaultElasticsearch",
                "Protocol": "http",
                "HostName": "localhost",
                "Port": 9200,
                "DefaultIndex": "integration-engine"
            }
        ]
    }
}