The wire listener configuration file
The settings that control the wire listener and the connection between the client and database server are set in the wire listener configuration file.
The default name for the configuration file is $INFORMIXDIR/etc/jsonListener.properties. You can rename this file, but the suffix must be .properties.
If you create a server instance during the installation process, a configuration file that is named jsonListener.properties is automatically created with default properties, otherwise you must manually create the configuration file. You can use the $INFORMIXDIR/etc/jsonListener-example.properties file as a template.
In the configuration file that is created during installation, and in the template file, all of the parameters are commented out by default. To enable a parameter, you must uncomment the row and customize the parameter.
- Required
- Setup and configuration
- Command and operation configuration
- Database resource management
- MongoDB compatibility
- Performance
- Security
- authentication.enable
- authentication.localhost.bypass.enable
- command.denylist
- db.authentication
- listener.admin.ipAddress
- listener.authentication.timeout
- listener.http.accessControlAllowCredentials
- listener.http.accessControlAllowHeaders
- listener.http.accessControlAllowMethods
- listener.http.accessControlAllowOrigin
- listener.http.accessControlExposeHeaders
- listener.http.accessControlMaxAge
- listener.http.headers
- listener.http.headers.size.maximum
- listener.rest.cookie.domain
- listener.rest.cookie.httpOnly
- listener.rest.cookie.length
- listener.rest.cookie.name
- listener.rest.cookie.path
- listener.rest.cookie.secure
- listener.ssl.algorithm
- listener.ssl.ciphers
- listener.ssl.enable
- listener.ssl.key.alias
- listener.ssl.key.password
- listener.ssl.keyStore.file
- listener.ssl.keyStore.password
- listener.ssl.keyStore.type
- listener.ssl.protocol
- security.sql.passthrough
- Wire listener resource management
- cursor.idle.timeout
- listener.connectionPool.closeDelay.time
- listener.connectionPool.closeDelay.timeUnit
- listener.idle.timeout
- listener.idle.timeout.minimum
- listener.input.buffer.size
- listener.memoryMonitor.enable
- listener.memoryMonitor.allPoint
- listener.memoryMonitor.diagnosticPoint
- listener.memoryMonitor.zeroPoint
- listener.output.buffer.size
- listener.pool.admin.enable
- listener.pool.keepAliveTime
- listener.pool.queue.size
- listener.pool.size.core
- listener.pool.size.maximum
- listener.socket.accept.timeout
- listener.socket.read.timeout
- pool.connections.maximum
- pool.idle.timeout
- pool.idle.timeunit
- pool.lenient.return.enable
- pool.lenient.dispose.enable
- pool.semaphore.timeout
- pool.semaphore.timeunit
- pool.service.interval
- pool.service.threads
- pool.service.timeunit
- pool.size.initial
- pool.size.minimum
- pool.size.maximum
- pool.type
- pool.typeMap.strategy
- response.documents.size.minimum
- timeseries.loader.connections
Required parameter
You must configure the url parameter before using the wire listener.- url
- This required parameter specifies the host name, port number, user ID, and password that are used in connections to the database server.
Setup and configuration
These parameters provide setup and configuration options.- documentIdAlgorithm
- This optional parameter determines the algorithm that is used to generate the unique Informix® identifier for the ID column that is the primary key
on the collection table. The _id field of the document is used as the input to the algorithm. The
default value is
documentIdAlgorithm=ObjectId
. - include
- This optional parameter specifies the properties file to reference. The path can be absolute or relative. For more information, see Running multiple wire listeners.
- listener.onException
- This optional parameter specifies an ordered list of actions to take if an exception occurs that is not handled by the processing layer.
- listener.hostName
- This optional parameter specifies the host name of the wire listener.
The host name determines the network adapter or interface that the
wire listener binds the server socket to. Tip: If you enable the wire listener to be accessed by clients on remote hosts, turn on authentication by using the authentication.enable parameter.listener.hostName= { localhost | hostname | * }
- listener.port
- This optional parameter specifies the port number to listen on for incoming connections from
clients. This value can be overridden from the command line by using the -port
argument. The default value is 27017.Important: If you specify a port number that is less than 1024, the user that starts the wire listener might require additional operating system privileges.
- listener.timezone
- This parameter specifies the timezone of the listener java JVM. This will override any system or
user configured default timezone. The timezone property affects the timezone of date values that are
used outside of BSON documents. Important: It is recommended that the listener timezone be set to UTC (or GMT). You should change this property only if you are using the listener to interact with relational tables that store dates in a timezone other than UTC/GMT.
- listener.type
- This optional parameter specifies the type of wire listener to start.
- response.documents.count.default
- This optional parameter specifies the default number of documents in a single response to a query. The default value is 100.
- response.documents.count.maximum
- This optional parameter specifies the maximum number of documents in a single response to a query. The default value is 10000.
- response.documents.size.maximum
- This optional parameter specifies the maximum size, in bytes, of all documents in a single response to a query. The default value is 1048576.
- sharding.enable
- This optional parameter indicates whether to enable the use of commands and queries on sharded data.
- sharding.parallel.query.enable
- This optional parameter indicates whether to enable the use of parallel sharded queries. Parallel sharded queries require that the SHARD_ID configuration parameter be set to unique IDs on all shard servers. The sharding.enable parameter must also be set to true.
Command and operation configuration
These parameters provide configuration options for JSON commands and operations.- collection.informix.options
- This optional parameter specifies which table options for shadow columns or auditing to use when creating a JSON collection.
- command.listDatabases.sizeStrategy
- This optional parameter specifies a strategy for calculating the size of your database
when the MongoDB listDatabases command is run. The
listDatabases command estimates the size of all collections and collection indexes for each
database. However, relational tables and indexes are excluded from this size calculation. Important: The MongoDB listDatabases command performs expensive and CPU-intensive computations on the size of each database in the database server instance. You can decrease the expense by using the command.listDatabases.sizeStrategy parameter.
- update.client.strategy
- This optional parameter specifies the method that is used by the wire listener to send updates to the database server. When the wire listener does the update processing, it queries the server for the existing document and then updates the document.
- update.mode
- This optional parameter determines where document updates are processed. The default
value is
update.mode=mixed
.
Database resource management
These parameters provide database resource management options.- database.buffer.enable
- Prerequisite:This optional parameter indicates whether to enable buffered logging when you create a database by using the wire listener.
database.log.enable=true
- database.create.enable
- This optional parameter indicates whether to enable the automatic creation of a database, if a database does not exist.
- database.dbspace
- Prerequisite:This optional parameter specifies the name of the dbspace databases that are created. The default value is database.dbspace=rootdbs.
dbspace.strategy=fixed
- database.locale.default
- This optional parameter specifies the default locale to use when a database is created by using the wire listener. The default value is en_US.utf8.
- database.log.enable
- This optional parameter indicates whether to create databases that are enabled for logging.
- database.onException.errorCodes
- A JSON document describing what actions to take on specific database error codes. Each action should be followed by an array of the database's integer error codes that should trigger the specified action.
- dbspace.strategy
- This optional parameter specifies the strategy to use when determining the location of new databases, tables, and indexes.
- fragment.count
- This optional parameter specifies the number of fragments to use when creating a collection. If you specify 0, the database server determines the number of fragments to create. If you specify a fragment_num greater than 0, that number of fragments are created when the collection is created. The default value is 0.
- jdbc.afterNewConnectionCreation
- This optional parameter specifies one or more SQL commands to run after a new connection to the database is created.
MongoDB compatibility
These parameters provide options for MongoDB compatibility.- compatible.maxBsonObjectSize.enable
- This optional parameter indicates whether the maximum BSON object size is compatible with
MongoDB.Tip: If you insert a BSON document by using an SQL operation, Informix® supports a maximum document size of 2 GB.
- mongo.api.version
- This optional parameter specifies the MongoDB API version with which the wire listener is compatible. The version affects authentication methods as well as MongoDB commands.
- update.one.enable
- This optional parameter indicates whether to enable support for updating a single JSON document.
Important: The update.one.enable parameter applies to JSON collections only. For relational tables, the MongoDB multi-parameter is ignored and all documents that meet the query criteria are updated.
Performance
These parameters provide performance options for databases and collections.- delete.preparedStatement.cache.enable
- This optional parameter indicates whether to cache prepared statements that delete documents for reuse.
- insert.batch.enable
- If multiple documents are sent as a part of a single INSERT statement, this optional parameter indicates whether to batch document inserts operations into collections.
- insert.batch.queue.enable
- This optional parameter indicates whether to queue INSERT statements into larger batches. You can improve insert performance by queuing INSERT statements, however, there is decreased durability.
- insert.batch.queue.flush.interval
- Prerequisite:This optional parameter specifies the number of milliseconds between flushes of the insert queue to the database server. The default value is
insert.batch.queue.enable=true
insert.batch.queue.flush.interval=100
. - index.cache.enable
- This optional parameter indicates whether to enable index caching on collections. To write the most efficient queries, the wire listener must be aware of the existing BSON indexes on your collections.
- index.cache.update.interval
- This optional parameter specifies the amount of time, in seconds, between updates to the index
cache on a collection table. The default value is
index.cache.update.interval=120
. - insert.preparedStatement.cache.enable
- This optional parameter indicates whether to cache the prepared statements that are used to insert documents.
- preparedStatement.cache.enable
- This optional parameter indicates whether to cache prepared statements for reuse.
- preparedStatement.cache.size
- This optional parameter specifies the size of the least-recently used (LRU) map that is used to
cache prepared statements. The default value is
preparedStatement.cache.size=20
.
Security
The parameters provide security enablement options.- authentication.enable
- This optional parameter indicates whether to enable user authentication.
- authentication.localhost.bypass.enable
- Prerequisite:If you connect from the localhost to the Informix® admin database, and the admin database contains no users, this optional parameter indicates whether to grant full administrative access.
authentication.enable=true
- command.denylist
- This optional parameter lists commands that are removed from the command registry and can not be called. By default, the deny list is empty.
- db.authentication
- This optional parameter specifies the user authentication method. See User authentication with the wire listener.
- listener.admin.ipAddress
- This optional parameter specifies the IP address for the administrative host. Must be a loopback
IP address. The default value is 127.0.0.1.Important: If you specify an address that is not a loopback IP address, an attacker might perform a remote privilege escalation and obtain administrative privileges without knowing a user password.
- listener.authentication.timeout
- This optional parameter specifies the number of milliseconds that the wire listener waits for a client connection to authenticate. The default value is 0, which indicates that the wire listener waits indefinitely for client connections to authenticate.
- listener.http.accessControlAllowCredentials
- This optional parameter indicates whether to display the response to the request when the omit credentials flag is not set. When this parameter is part of the response to a preflight request, it indicates that the actual request can include user credentials.
- listener.http.accessControlAllowHeaders
- This optional parameter, which is part of the response to a preflight
request, specifies the header field names that are used during the
actual request. You must specify the value by using a JSON array of
strings. Each string in the array is the case-insensitive header field
name. The default value is
listener.http.accessControlAllowHeaders=["accept","cursorId","content-type"]
. - listener.http.accessControlAllowMethods
- This optional parameter, which is part of the response to a preflight
request, specifies the REST methods that are used during the actual
request. You must specify the value by using a JSON array of strings.
Each string in the array is the name of an HTTP method that is allowed.
The default value is
listener.http.accessControlAllowMethods=["GET","PUT","POST","DELETE","OPTIONS"]
. - listener.http.accessControlAllowOrigin
- This optional parameter specifies which uniform resource identifiers (URI) are authorized to receive responses from the REST listener when processing cross-origin resource sharing (CORS) requests. You must specify the value by using a JSON array of strings, with a separate string in the array for each value for the HTTP Origin header in a request. The values that are specified in this parameter are validated to ensure that they are identical to the Origin header.
- listener.http.accessControlExposeHeaders
- This optional parameter specifies which headers of a CORS request
to expose to the API. You must specify the value by using a JSON array
of strings. Each string in the array is the case-insensitive name
of a header to be exposed. The default value is
listener.http.accessControlExposeHeaders=["cursorId"]
. - listener.http.accessControlMaxAge
- This optional parameter specifies the amount of time, in seconds, that the result of a preflight request is cached in a preflight result cache. A value of 0 indicates that the Access-Control-Max-Age header is not included in the response to a preflight request. A value greater than 0 indicates that the Access-Control-Max-Age header is included in the response to a preflight request.
- listener.http.headers
- This optional parameter specifies the information to include in the HTTP headers of responses, as a JSON document. The default value is no additional information in the HTTP headers.
- listener.http.headers.size.maximum
- This optional parameter specifies the maximum size of headers in incoming HTTP requests. The default is 8192 bytes.
- listener.rest.cookie.domain
- This optional parameter specifies the name of the cookie that is created by the REST wire listener. If not specified, the domain is the default value as determined by the Apache Tomcat web server.
- listener.rest.cookie.httpOnly
- This optional parameter indicates whether to set the HTTP-only flag.
- listener.rest.cookie.length
- This optional parameter specifies the length, in bytes, of the
cookie value that is created by the REST wire listener, before Base64
encoding. The default value is
listener.rest.cookie.length=64
. - listener.rest.cookie.name
- This optional parameter specifies the name of the cookie that
is created by the REST wire listener to identify a session. The default
value is
listener.rest.cookie.name=informixRestListener.sessionId
. - listener.rest.cookie.path
- This optional parameter specifies the path of the cookie that
is created by the REST wire listener. The default value is
listener.rest.cookie.path=/
. - listener.rest.cookie.secure
- This optional parameter indicates whether the cookies that are created by the REST wire listener have the secure flag on. The secure flag prevents the cookies from being used over an unsecure connection.
- listener.ssl.algorithm
- This optional parameter specifies the Service Provider Interface (SPI) for the KeyManagerFactory
that is used to access the network encryption keystore. On an Oracle Java Virtual Machine (JVM),
this value is typically SunX509. On an IBM® JVM,
this value is typically IbmX509. The default value is no SPI.Important: Do not set this property if you are not familiar with Java Cryptography Extension (JCE).
- listener.ssl.ciphers
- This optional parameter specifies a list of Secure Sockets Layer (SSL) or Transport Layer
Security (TLS) ciphers to use with network encryption. The default value is no ciphers, which means
that the default list of enabled ciphers for the JVM are used.Important: Do not set this property if you are not familiar with Java Cryptography Extension (JCE) and the implications of using multiple ciphers. Consult a security expert for advice.
- listener.ssl.enable
- This optional parameter enables SSL or TLS network encryption on the socket for client connections. See Configuring SSL connections between the wire listener and client applications.
- listener.ssl.key.alias
- This optional parameter specifies the alias, or identifier, of the entry into the keystore. The default value is no alias, which indicates that the keystore contains one entry. If the keystore contain more than one entry and a key password is needed to unlock the keystore, set this parameter to the alias of the entry that unlocks the keystore.
- listener.ssl.key.password
- This optional parameter specifies the password to unlock the entry into the keystore, which is identified by the listener.ssl.key.alias parameter. The default value is no password, which means to use the keystore password. If the entry into the keystore requires a password that is different from the keystore password, set this parameter to the entry password.
- listener.ssl.keyStore.file
- This optional parameter specifies the fully-qualified path and file name of the Java keystore file to use for network encryption. The default value is no file.
- listener.ssl.keyStore.password
- This optional parameter specifies the password to unlock the Java keystore file for network encryption. The default value is no password.
- listener.ssl.keyStore.type
- This optional property specifies the provider identifier for the network encryption keystore
SPI. The default value is JKS.Important: Do not set this property if you are not familiar with Java Cryptography Extension (JCE).
- listener.ssl.protocol
- This optional parameter specifies the SSL or TLS protocols. The default value is TLS.
- security.sql.passthrough
- This optional parameter indicates whether to enable support for issuing SQL statements by using JSON documents.
Wire listener resource management
These parameters provide wire listener resource management options.- cursor.idle.timeout
- This optional parameter specifies the number of milliseconds that a cursor can be idle before it is closed. The default value is 30000. A positive integer value for time specifies the number of milliseconds before an idle timeout.
- listener.connectionPool.closeDelay.time
- This optional parameter specifies the amount of time to keep a connection pool open after the last client disconnects. When the existing connection pool is open, the next connection can connect faster by reusing the existing pool instead of creating a new connection pool. The default value is 0, which indicates that the connection pool is closed immediately after the last client disconnects. A positive integer value for time specifies the number of time units to keep the connection pool open. The unit of time is set by the listener.connectionPool.closeDelay.timeUnit parameter.
- listener.connectionPool.closeDelay.timeUnit
- This optional parameter specifies the time unit for the listener.connectionPool.closeDelay.time parameter. The unit can be NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES, HOURS, or DAYS. The default value is SECONDS.
- listener.idle.timeout
- This optional parameter specifies the amount of time, in milliseconds, that a client connection
to the wire listener can idle before it is forcibly closed. You can use this parameter to close
connections and free associated resources when clients are idle. The default value is 300000
milliseconds. The value of 0 indicates that client connections are never timed out.Important: When set to a nonzero value, the wire listener socket that is used to communicate with a MongoDB client is forcibly closed after the specified time. To the client, the forcible closure appears as an unexpected disconnection from the server the next time there is an attempt to write to the socket.
- listener.idle.timeout.minimum
- This optional parameter specifies the lower threshold, in milliseconds, of the listener idle timeout, which is set by the low memory monitor. The default value is 10000 milliseconds. This property has no effect when the heap size is sufficiently large to not need a reduction in idle timeout.
- listener.input.buffer.size
- This optional parameter specifies the size, in MB, of the input buffer for each wire listener socket. The default value is 8192 bytes.
- listener.memoryMonitor.enable
- This optional parameter enables the wire listener memory monitor. When memory usage for the wire listener is high, the memory monitor attempts to reduce resources, such as removing cached JDBC prepared statements, removing idle JDBC connections from the connection pools, and reducing the maximum size of responses.
- listener.memoryMonitor.allPoint
- This optional parameter specifies the maximum percentage of heap usage before the memory monitor reduces resources. The default value is 80.
- listener.memoryMonitor.diagnosticPoint
- This optional parameter specifies the percentage of heap usage before diagnostic information about memory usage is logged. The default value is 99.
- listener.memoryMonitor.zeroPoint
- This optional parameter specifies the percentage of heap usage before the memory manager reduces resource usage to the lowest possible levels. The default value is 95.
- listener.output.buffer.size
- This optional parameter specifies the size, in MB, of the output buffer for each listener socket. The default value is 8192 bytes.
- listener.pool.admin.enable
- This optional parameter enables a separate thread pool for connections from the administrative IP address, which is set by the listener.admin.ipAddress parameter. The default value is false. A separate thread pool ensures that administrative connections succeed even if the listener thread pool lacks available resources.
- listener.pool.keepAliveTime
- This optional parameter specifies the amount of time, in seconds, that threads above the core pool size are allowed to idle before they are removed from the wire listener JDBC connection pool. The default value is 60 seconds.
- listener.pool.queue.size
- This optional parameter specifies the number of requests to queue above the core wire listener pool size before expanding the pool size up to the maximum. A positive integer specifies the queue size to use before expanding the pool size up to the maximum.
- listener.pool.size.core
- This optional parameter specifies the maximum sustained size of the thread pool that listens for incoming connections from clients. The default value is 128.
- listener.pool.size.maximum
- This optional parameter specifies the maximum peak size of the thread pool that listens for incoming connections from clients. The default value is 1024.
- listener.socket.accept.timeout
- This optional parameter specifies the number of milliseconds that a server socket waits for an accept() function. The default value is 1024. The value of 0 indicates to wait indefinitely. The value of this parameter can affect how quickly the wire listener shuts down.
- listener.socket.read.timeout
- This optional parameter specifies the number of milliseconds to block when calling a read() function on the socket input stream. The default value is 1024. A value of 0 might prevent the wire listener from shutting down because the threads that poll the socket might never unblock.
- pool.connections.maximum
- This optional parameter specifies the maximum number of active connections to a database. The default value is 50.
- pool.idle.timeout
- This optional parameter specifies the minimum amount of time that an idle connection is in the
idle pool before it is closed. The default value is 60 and the default time unit is seconds.Important: Set the unit of time in the pool.idle.timeunit parameter. The default value is seconds.
- pool.idle.timeunit
- Prerequisite:This optional parameter specifies the unit of time that is used to scale the pool.idle.timeout parameter.
pool.idle.timeout=time
- pool.lenient.return.enable
- This optional parameter suppresses the following checks on a connection that is being returned
that might throw exceptions:
- An attempt to return a pooled connection that is already returned.
- An attempt to return a pooled connection that is owned by another pool.
- An attempt to return a pooled connection that is an incorrect type.
- pool.lenient.dispose.enable
- This optional parameter suppresses the checks on a connection that is being disposed of that might throw exceptions.
- pool.semaphore.timeout
- This optional parameter specifies the amount of time to wait to acquire a permit for a database
connection. The default value is 5 and the default time unit is seconds.Important: Set the unit of time in the pool.semaphore.timeunit parameter.
- pool.semaphore.timeunit
- Prerequisite:This optional parameter specifies the unit of time that is used to scale the pool.semaphore.timeout parameter.
pool.semaphore.timeout=wait_time
- pool.service.interval
- This optional parameter specifies the amount of time to wait between scans of the idle
connection pool. The idle connection pool is scanned for connections that can be closed because they
have exceeded their maximum idle time. The default value is 30.Important: Set the unit of time in the pool.service.timeunit parameter.
- pool.service.threads
- This optional parameter specifies the number of threads to use for the maintenance of connection pools that share a common service thread pool. The default value is 1.
- pool.service.timeunit
- Prerequisite:This optional parameter specifies the unit of time that is used to scale the pool.service.interval parameter.
pool.service.interval=wait_time
- pool.size.initial
- This optional parameter specifies the initial size of the idle connection pool. The default value is 0.
- pool.size.minimum
- This optional parameter specifies the minimum size of the idle connection pool. The default value is 0.
- pool.size.maximum
- This optional parameter specifies the maximum size of the idle connection pool. The default value is 50.
- pool.type
- This optional parameter specifies the type of pool to use for JDBC connections. The available pool types are:
- pool.typeMap.strategy
- This optional parameter specifies the strategy to use for distribution and synchronization of the JDBC type map for each connection in the pool.
- response.documents.size.minimum
- This optional parameter specifies the number of bytes for the lower threshold for the maximum response size, which is set by the response.documents.size.maximum parameter. The memory manager can reduce the response size to this size when resources are low. The default value is 65536 bytes.
- timeseries.loader.connections
- This optional parameter specifies the number of connections between each time series table and the MQTT wire listener for loading time series data. The default value is 10 connections per table.