Apama Documentation : Deploying and Managing Apama Applications : Correlator Utilities Reference : Starting the event correlator
Starting the event correlator
 
Specifying log filenames
Examples for specifying log filenames
Descriptions of correlator status log fields
Text internationalization issues
Determining whether to disconnect slow receivers
Injection time of compiled runtime
The correlator tool starts the event correlator. The executable for this tool is located in the bin directory of the Apama installation. Running the tool in the Apama Command Prompt (see Setting up the environment using the Apama Command Prompt) ensures that the environment variables are set correctly.
Synopsis
To start the event correlator, run the following command:
correlator [ options ]
When you run this command with the –h option, the usage message for this command is shown.
Description
By default, the correlator tool starts an event correlator process on the current host, and configures it to listen on port 15903 for monitoring and management requests.
On start-up, the executable displays the current version number and configuration settings.
To terminate an event correlator process, press Ctrl+C in the window in which it was started. Alternatively, you can issue the engine_management command with the --shutdown option. See Shutting down and managing components. Regardless of which technique you use to terminate the correlator, Apama first tries to shut down the correlator cleanly. If this is not possible, for example, perhaps because of a monitor in an infinite loop, Apama forces the correlator to shut down.
Note:  
If a license file cannot be found, the correlator will run with reduced capabilities. See Running Apama without a license file.
Options
The correlator tool takes the following options:
Option
Description
-V | --version
Displays version information for the correlator.
-h | --help
Displays usage information.
-p port | --port port
Specifies the port on which the event correlator should listen for monitoring and management requests. The default is 15903.
-f file | --logfile file
Specifies the path of the status log file that the event correlator writes messages to. The default is stdout. See Specifying log filenames and Descriptions of correlator status log fields.
-v level | --loglevel level
Specifies the level of information that the event correlator sends to the correlator status log file. In increasing amount of information order, the value must be one of the following: OFF, CRIT, FATAL, ERROR, WARN, INFO, DEBUG, TRACE. The default is INFO.
-t | --truncate
Specifies that if the correlator status log file already exists, the correlator should empty it first. The default is to append to it.
-N name | --name name
Assigns a name to the correlator. The default is correlator. If you are running a lot of correlators you might find it useful to assign a name to each correlator. A name can make it easier to use the engine_management tool to manage correlators and adapters.
-l file | --license file
Specifies the path to the license file.
-m num | --maxoutstandingack num
Specifies that you want the correlator to buffer messages for up to num seconds for each receiver that the correlator sends events to. The default is 10. For additional information, see Determining whether to disconnect slow receivers.
-M num | --maxoutstandingkb num
Specifies that you want the correlator to buffer the events for each receiver up to the size in kb represented by num.
-x | --qdisconnect
Specifies that you want the correlator to disconnect receivers that are consuming events too slowly. For details, see Determining whether to disconnect slow receivers. The default is that the correlator does not disconnect slow receivers.
--logQueueSizePeriod p
Sets the interval at which the correlator sends information to its log file. The default is 5 seconds. Replace p with a float value for the period you want.
Caution:  
Setting logQueueSizePeriod to 0 turns logging off. Without correlator logging information, it is impossible to effectively troubleshoot problems. See also Descriptions of correlator status log fields.
--distMemStoreConfig dir
Specifies that the distributed MemoryStore is enabled, using the configuration files in the specified directory. Note that the configuration filenames must end with *-spring.xml and the correlator will not start unless the specified directory contains at least one configuration file. For more information on a distributed MemoryStore's configuration files, see Using the distributed MemoryStore.
--jmsConfig dir
Specifies that correlator-integrated messaging is enabled using the configuration files in the specified directory. Note that the configuration filenames must end with *-spring.xml and the correlator will not start unless the specified directory contains at least one configuration file. For more information on the configuration files for correlator-integrated messaging for JMS, see Configuration files.
-j | --java
Enables support for Java applications, which is needed to inject a Java application or plug-in using engine_inject –j.
-J option | --javopt option
Specifies an option or property that you want the correlator to pass to the embedded JVM. You must specify the -J option for each JVM option. You can specify the -J option multiple times in the same correlator.exe command line. For example, -J "-Djava.class.path=path" -J "-Da=value1" -J "-Db=value2" -J "-Xmx400m"
When you use this option to pass the classpath to the JVM Apama prepends the correlator internal JAR files to the path you specify. If you set the CLASSPATH environment variable and also specify this option when you start the correlator, the path you specify in the correlator start-up command takes precedence.
--inputLog file
Specifies the path of the input log file. The event correlator writes only input messages to the input log file. If there is a problem with your application, Software AG Global Support can use the input log to try to diagnose the problem. An input log contains only the external inputs to the correlator. There is no information about multi-context ordering. Consequently, if there is more than one context, there is no guarantee that you can replay execution in the same order as the original execution. See Replaying an input log to diagnose problems.
--XsetRandomSeed int
Starts the correlator with the random seed value you specify. Specify an integer whose value is in the range of 1 to 232. The correlator uses the random seed to calculate the random numbers returned by the integer.rand() and float.rand() functions. The same random seed returns the same sequence of random numbers. This option is useful when your application uses the integer.rand() and float.rand() functions and you are using an input log to capture events and messages coming into a correlator. If you need to reproduce correlator behavior from that input log, you will want the correlator to generate the same random numbers as it generated when the original input was captured.
-XignoreEnqueue
For internal use only. Instructs the correlator to ignore enqueue statements when replaying an input log.
--inputQueueSize int
Sets the maximum number of spaces in every context's input queue. The default is that each input queue has 20,000 spaces. If events are arriving on an input queue faster than the correlator can process them the input queue can fill up. You can set the inputQueueSize option to allow all input queues to accept more events. Typically, the default input queue size is enough so if you find that you need to increase the size of the input queue you should try to understand why the correlator cannot process the events fast enough to leave room on the default-sized queue. If you notice that adapters or applications are blocking it might be because a public context's input queue is full. To determine if a public context's input queue is full, use output from the engine_inspect tool in conjunction with the status messages in the correlator log file.
-g | --nooptimize
Disables correlator optimizations that hinder debugging. Specify this option when you plan to run the engine_debug tool. You cannot run the engine_debug tool if you did not specify the -g option when you started the correlator.
Software AG Designer automatically uses the -g option when it starts a correlator from a debug launch configuration. However, if you are connecting to an externally-started correlator, and you want to debug in that correlator, you must ensure that the -g option was specified when the externally-started correlator was started.
-P
Enables correlator persistence. You must specify this option to enable correlator persistence. If you do not specify any other correlator persistence options, the correlator uses the default persistence behavior as described in Enabling correlator persistence. If you specify one or more additional correlator persistence options, the correlator uses the settings you specify for those options and uses the defaults for the other persistence options.
-PsnapshotInterval=interval
Specifies the period between persistence snapshots. The default is 200 milliseconds.
-PadjustSnapshot=boolean
Indicates whether or not the correlator should automatically adjust the snapshot interval according to application behavior. The default is true, which means that the correlator does automatically adjust the snapshot interval. You might want to set this to false to diagnose a problem or test a new feature.
-PstoreLocation=path
Specifies the path for the directory in which the correlator stores persistent state. The default is the current directory, which is the directory in which the correlator was started.
-PstoreName=file
Specifies the name of the file that contains the persistent state. This is the recovery datastore. The default is persistence.db.
-Pclear
Specifies that you want to clear the contents of the recovery datastore. This option applies to the recovery datastore you specify for the -PstoreName option or to the default persistence.db file if you do not specify the -PstoreName option. When the correlator starts it does not recover from the specified recovery datastore.
-XrecoveryTime num
For correlators that use an external clock, this is a time expression that represents the time of day that a correlator starts at when it recovers persistent state and restarts processing. The default is the time expression that represents the time of day captured in the last committed snapshot. This option is useful only for replaying input logs that contain recovery information. To change the default, specify a number that indicates seconds since the epoch.
-noDatabaseInReplayLog
Specifies that the correlator should not copy the recovery datastore to the input log when it restarts a persistence-enabled correlator. The default is that the correlator does copy the recovery datastore to the input log upon restarting a persistence-enabled correlator. You might set this option if you are using an input log as a record of what the correlator received. The recovery datastore is a large overhead that you probably do not need. Or, if you maintain an independent copy of the recovery datastore, you probably do not want a copy of it in the input log.
--runtime mode
On Linux 64-bit systems, you can specify whether you want the correlator to use the compiled runtime or the interpreted runtime, which is the default. Specify --runtime compiled or --runtime interpreted.
The interpreted runtime compiles EPL into bytecode whereas the compiled runtime compiles EPL into native code that is directly executed by the CPU. For many applications, the compiled runtime provides significantly faster performance than the interpreted runtime. Applications that perform dense numerical calculations are most likely to have the greatest performance improvement when the correlator uses the compiled runtime. Applications that spend most of their time managing listeners and searching for matches among listeners typically show a smaller performance improvement.
Using the compiled runtime requires that the binutils package is installed on the Linux system.
Other than performance, the behavior of the two runtimes is the same except for the following:
*The interpreted runtime allows for the profiler and debugger to be switched on during the execution of EPL. The compiled runtime does not permit this. For example, you cannot switch on the profiler or debugger in the middle of a loop.
*The amount of stack space available is different for the two runtimes. This means that recursive functions run out of stack space at a different level of recursion on the two runtimes.
Note:  
If you are using both correlator persistence (-P option) and the compiled runtime (--runtime compiled option), we recommend the use of the --runtime-cache option to improve recovery times.
--runtime-cache dir
Enables caching of compiled runtime objects in the specified directory. Subsequent injections of the same files to any correlator using that cache will be quicker. For more information, see Injection time of compiled runtime.
--frequency num
Instructs the correlator to generate clock ticks at a frequency of num per second. Defaults to 10, which means there is a clock tick every 0.1 seconds. Be aware that there is no value in increasing num above the rate at which your operating system can generate its own clock ticks internally. On UNIX and some Windows machines this is 100 and on other Windows machines it is 64.
-Xclock | --externalClock
Instructs the correlator to disable its internal clock. By default, the correlator uses internally generated clock ticks to assign a timestamp to each incoming event. When you specify the -Xclock option, you must send time events (&TIME) to the correlator. These time events set the correlator's clock. For additional information, see Determining whether to disable the correlator's internal clock.
-Xconfig file | --configFile file
Specifies a special configuration file that the correlator uses to initialize its networking. Specify this option only as directed by Apama Technical Support to troubleshoot networking problems. For more information, see Using the Apama component extended configuration file.
-r list | --rnames list
Specifies one or more Universal Messaging (UM) realm names that you want this correlator to connect to. Separate names with commas. See Starting correlators that use UM.
If you specify the --rnames option and also the --umConfigFile option, the specified UM configuration file takes precedence.
-UMconfig file | --umConfigFile file
Specifies the name of a properties file that defines the UM configuration for this correlator. See Defining UM properties for Apama applications.
If you specify the --rnames option and also the --umConfigFile option, the specified UM configuration file takes precedence.
--connectivityConfig file
Specifies the path to the configuration file that specifies connectivity plug-ins to send and receive messages. For more information, see Using Connectivity Plug-ins.
--config file
Available as of 9.10.0.4. Specifies the name of a .yaml file that is used to configure the correlator. This option may only be specified once. See also About deploying Apama applications with a YAML configuration file.
Exit status
The correlator tool returns the following exit values:
Value
Description
0
The event correlator terminated successfully.
1
An error occurred which caused the event correlator to terminate abnormally.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback