Deployment and Configuration

The monitoring service is typically deployed as a RESTful web service using two differnt models:

http://<server:port>/<application context>/health
java -jar direct-msg-monitor-sboot-<version>.jar

Using the SpringBoot option, it also possible to deploy to platforms such as CloudFoundry. The source code repository contains a sample manifest.yml for deploying to a CloudFoundry instance.

Service Configuration

The service defines Spring bean Java classes as part of its default configuration. The default bean configuration is generally fine for most deployments leaving other deployment type decisions such as database connections to be configured in a properties file. Almost all of the configurable parameters are externalized into a properties file named bootstrap.properties under the /WEB-INF/classes directory if deployed into Tomcat. If deployed as a SpringBoot application, there are several options for configuration such as using a SpringCloud configuration server or using a local properties file. More information on externalizing SpringBoot configuration can be found [here](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html).

The next sections break down the different configuration parameters in the bootstrap.properties file.

Aggregation Timeout

The following properties tune the configuration for aggregation timeout:

Message Failure Generator

The following properties control the content of different parts of the DNSMessageGenerator. The generator and support HTML content for rich presentation formats.

Aggregator Persistence, Recovery, and Retry

The default Camel implementation of the aggregator holds active message in memory. If the service were to crash, the active messages would be lost. To prevent message loss, Camel provides a configurable mechanism for persisting and recovering active messages. After the aggregator completion condition is met (or timesout), Camel delivers the aggregated message to the next step in the route. As you can see in our Spring DSL, messages are moved onto the DSN generator. If for some reason the messages cannot be delivered to the gatewayURL, it is necessary to retry sending the messages to the gateway. The properties file contains configuration properties for controlling all of these parameters.