-
Notifications
You must be signed in to change notification settings - Fork 1
Commands
Since v11 (@see Issue #61), the IAS supports the sending of commands and the command/reply pattern in java and scala.
Commands are published in the CmdTopic
kafka topic and replies in ReplyTopic
as JSON strings, as usual.
There is a set of available commands as you can see in CommandType.java
and in IasCommandType.py
, each of which with parameters and a optional map of properties.
To send a command the user must provide the ID of the destination (*
for broadcast) and optionally parameters and properties. The receivers of the commands must filter out the commands sent to other destinations and process its owns.
Processing of commands happens by instantiating an object of CommandManager
that takes care of connecting to the command and reply topics and filters out undesired messages. The CommandManager
forward commands to a listener for execution; there is a default command executor, DefaultCommandExecutor
that can be extended to customize commands.
A python command, iasSendCmd
, allows to send commands from the command line: use the -h
switch for help and a list of supported comands. The script sends a command and exit: if you need to check for the reply you have to monitor the reply topic for example with the following command:
iasDumpKafkaTopic -t reply|jq
.