Starting the wire listener

You can start the wire listener for the MongoDB API, the REST API, or the MQTT protocol, by using the start command.

Before you begin

  • Stop all wire listeners that are currently running. If you create a server instance during the installation process, the MongoDB API wire listener is started automatically and connected to the MongoDB API.
  • If you plan to customize the Logback logger or another custom Simple Logging Facade for Java (SLF4J) logger, you must configure the logger before starting the wire listener.
  • Configuring the wire listener for the first time
  • Requirements for JSON compatibility

Procedure

To start the wire listener, run the wire listener command with the -start option. For example:
java -cp $INFORMIXDIR/bin/jsonListener.jar
 com.ibm.nosql.server.ListenerCLI
-config $INFORMIXDIR/etc/jsonListener.properties -start
The listener.type property in the configuration file that you specify defines whether to start the wire listener for the MongoDB API, the REST API, or the MQTT protocol.

Results

The wire listener starts.

Examples

In the following example, the wire listener is started with the configuration file specified as jsonListener_mongo.properties, the log file specified as jsonListener_mongo.log, and the log level specified as info:
java -cp $INFORMIXDIR/bin/jsonListener.jar
 com.ibm.nosql.server.ListenerCLI
-config $INFORMIXDIR/etc/jsonListener_mongo.properties
-logfile $INFORMIXDIR/jsonListener_mongo.log
-loglevel info -start
Here is the output from starting the wire listener:
starting mongo listener on port 27017
In the following example, the wire listener is started with the configuration file specified as jsonListener_rest.properties:
java -cp $INFORMIXDIR/bin/jsonListener.jar
 com.ibm.nosql.server.ListenerCLI 
-config $INFORMIXDIR/etc/jsonListener_rest.properties -start
Here is the output from starting the REST API wire listener:
starting rest listener on port 27017

Copyright© 2019 HCL Technologies Limited