Developing Apama Applications > Developing Adapters > Using the IAF > IAF Client – Managing a running adapter II
IAF Client – Managing a running adapter II
The IAF Client tool is provided for performing IAF-specific management operations on a running adapter. It can be used to stop a running adapter, to temporarily pause sending of events from an adapter into the event correlator, and to request an adapter to dynamically reload its configuration.
The executable for this tool is iaf_client (on UNIX) or iaf_client.exe (on Windows). The complete usage information (as displayed when it is run with the --help option) is as follows:
Usage: iaf_client [ options ]
Where options include:
-h | --help This message
-n | --hostname <host> Connect to an IAF on <host>
-p | --port <port> IAF is listening on <port>
-r | --reload Tell the IAF to reload its config
-s | --suspend Tell the IAF to suspend event sending
-t | --resume Tell the IAF to resume event sending
-q | --quit Tell the IAF to shut down
-v | --verbose Be more verbose
-V | --version Print program version info
One of --reload, --quit, --suspend, -q, -r or -s must be specified
Note that if the adapter is listening for control connections on a non-standard port (specified with the -–port option to the iaf program), you must pass the same port number to iaf_client.
Also, can only use ASCII characters to specify the name of the host.
Suspend and resume
The --suspend and --resume options control the sending of events to the correlator, not to the external transport.
Adapter reload
The --reload option is worthy of further explanation. Using --reload it is possible to dynamically reconfigure a running adapter from a changed configuration file without restarting the IAF.
When the IAF is started, it loads all the transport and codec plug-ins defined in its configuration file, and initializes them with any plug-in-specific properties provided.
When an adapter is reconfigured using --reload, the IAF will:
*Pass the current set of <property> names and values in the configuration file to each loaded transport and codec layer plug-in.
Note: Although plug-in authors will support dynamic reconfiguration of properties wherever possible, it is important to be aware that there may be some properties that by the nature can not be changed while the adapter is still running. These should be detailed in the documentation for the transport or codec plug-in. Some transport and codec plug-ins may not support configuration file reloading at all; this should be documented by the specific plug-ins.
*Load and initialize any new transport and codec layer plug-ins that have been listed in the <transports> and <codecs> sections of the configuration file.
*Unload any transport and codec layer plug-ins that are no longer listed in the <transports> and <codecs> sections of the configuration file.
Changing the name of a running plug-in and performing a reload is equivalent to unloading the plug-in and then loading it again. It is important to realize that this will result in any runtime state stored in memory by the plug-in being lost.
Note: It is not possible to dynamically change a loaded plug-in’s C/C++ library filename or Java className, nor to change a C/C++ plug-in into a Java one (or vice-versa).
If an adapter is reconfigured to use a different log file and the IAF cannot write to the new log file when reloaded, the IAF uses the log file the adapter was using before reconfiguring. If the IAF cannot use the original log file, it writes to stderr.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.