Each Enterprise Message API consumer-type application must eventually instantiate an OmmConsumer object. Constructors for OmmConsumer require a OmmConsumerConfig object. The OmmConsumerConfig constructor can read and process an optional XML file, which applications can use to modify Enterprise Message API’s default consumer behavior. By default this file is named EmaConfig.xml and stored in the working directory. For details on using non-default names and directories for your XML configuration file, refer to Section 4.3.1.2.
The Enterprise Message API provides a hard-coded configuration for use whenever an OmmConsumerConfig object is instantiated without a configuration file (such as EmaConfig.xml) in the run-time environment. The resulting configuration is created by taking the defaults from the various configuration groups. For example, the default (hard-coded) behavior for a Channel adheres to the following configuration:
• ChannelType value=”RSSL_SOCKET”
• CompressionType value=”None”
• TcpNoDelay value=”1”
• Host value=”localhost”
• Port value=”14002”
Note that unlike the Enterprise Message API’s default behavior of choosing the first Consumer component in the ConsumerList, Enterprise Message API applications will not choose the first Logger, Channel, or Dictionary in their respective lists. Instead, if an application wants to use a specific channel, logger, or dictionary configuration, the application must explicitly configure it in the appropriate Consumer section of the XML file.