On this page |
Lightweight message queue server that uses request-reply over TCP. Uses a push-pull message mechanism where messages are pushed by any client and pulled by other clients.
mqserver.exe [-i ip] [-p port] [-n max_connections] [-l log_level] [-c connection_file] [-g log_file] [-w port max_connections urlpath] [-t max_idle_seconds] [-r] [-s]
Example ¶
To... | Do this |
---|---|
Start a persistent MQ Server |
Callback Port is set to 53001 and Relay Port is set to 53000. HTTP server port is what is used by the pdg jobs (their Callback Port). The ports may have been chosen because they are accessible through machine firewalls. The Callback Port port must be open for outgoing connections on the farm machines, and incoming connections on the machine running MQ Server. Likewise the Relay Port must be open for incoming connections on the machine running MQ Server, and open for outgoing connections on the submitter’s machine (the machine running the TOP Cook). #!/bin/bash RELAYPORT=53000 HTTP_CALLBACK_PORT=53001 echo "STARTING MQSERVER with RELAY PORT ${RELAYPORT} and HTTP CALLBACK PORT ${HTTP_CALLBACK_PORT}" /mnt/hq/houdini_distros/hfs.linux-x86_64/bin/mqserver -s -p ${RELAYPORT} -n 1024 -l 2 -w ${HTTP_CALLBACK_PORT} 1024 result |
Connect to the persistent MQ Server |
With the above running on for example host
|
Options ¶
If the -i
option is provided, the server will use it as the IP address
for the client endpoint. Not specifying or using * results in server
automatically using the IP assigned to it. E.g. -i 127.0.0.1
If the -p
option is provided, the server will be run on the specified
port. Otherwise, the program will automatically scan for the first
available port.
The -n
option specifies the maximum number of connections. If it is
not specified, the maximum number of connections will default to 1024.
The -l
option specifies the log level. The log levels are:
0 - None, 1 - Errors, 2 - Warnings, 3 - All. If this option is not
provided, the log level will be set to 1 (Errors).
If the -c
option is provided, the server will write a connection
details file to the specified path.
If the -w
option is provided, a HTTP server will also be started
at specified port, with max connections, and url relative path
(e.g. '-w 5001 64 report/result' will listen at
http://127.0.0.1:5001/report/result with 64 max connections).
If the -s
option is provided, then this will run as a persistent
server (e.g. service) which means it cannot be remotely shutdown
nor will it timeout when no clients are connected.
If the -t
option is provided, then this will automatically shutdown
the server after the specified time in seconds if there hasn’t been any
network activity during the time.
If the -g
option is provided, the server will direct all logging to the
specified file by redirecting stdout
and stderr
.
If the -r
option is provided, the server will use round robin load
balancing when sending messages to clients with the same name.