Running multiple wire listeners
You can run multiple wire listeners.
By running multiple wire listeners, you can use a
combination of the APIs that are supported by the wire listener: MongoDB, REST, and MQTT. Create a configuration file
for each listener type that you want to run. For example, you can create a configuration file for
the MongoDB API and a configuration file for
the REST API or the MQTT protocol. You can start all wire listeners with the same
start command by providing multiple -config arguments.
Example: Running multiple wire listeners that share parameter settings
In this example, the same url, authentication.enable, and security.sql.passthrough parameters are used to run two wire listeners:- Create a configuration file named shared.properties that includes the
following
parameters:
url=jdbc:informix-sqli://localhost:9090/sysmaster: INFORMIXSERVER=ol_informix1210; authentication.enable=true security.sql.passthrough=true
- Create a configuration file for use with the MongoDB API
that is named mongo.properties, with the parameter include=shared.properties set:
include=shared.properties listener.type=mongo listener.port=27017
- Create a configuration file for use with the REST API that is
named rest.properties, with the parameter include=shared.properties set:
include=shared.properties listener.type=rest listener.port=8080
- From the command line, run the start command. Include separate
-config
arguments for each wire listener API type.java -jar $INFORMIXDIR/bin/jsonListener.jar -config json.properties -config rest.properties -start