<commit_before>Q.CONF(5)
=========
:doctype: manpage


NAME
----
q.conf - persistent, Transactional Message Queue (TMQ) configuration file


SYNOPSIS
--------
<QUEUE_NAME>,svcnm=<SERVICE_NAME>,autoq=<AUTOMATIC_Q>,tries=<TRIES>,waitinit=<INIT_WAIT>,waitretry=<RETRY_WAIT>,waitretrymax=<WAIT_MAX>,mode=<MODE>[,txtout=<TXTOUT>]


DESCRIPTION
-----------
'q.conf' defines the message queues for 'tmqueue'. The filename is passed to 'tmqueue' in 
application '-q' parameter. This file can be shared between multiple 'tmqueue' servers.
It is recommended to define default queue (special name is '@'). So that during operations if
specific queue is not found, then settings are taken from default queue. The queue definitions
also might not be complete. If so, then defaults are used for other parameters. It is recommended
to define default queue first. So that it can be using for other queue missing parameter defaulting.

Whitespace/empty lines are ignored. File may contains comments which are started at the beginning of the
line with '#' symbol.


DEBUG CONFIGURATION FILE SYNTAX
-------------------------------

*QUEUE_NAME>*::
	Queue name. For default queue use '@' symbol. Max name length is 15 symbols.
*SERVICE_NAME*::
	Service name to forward the message to. This is used for automatic queues. For manual queues
	you may put some dummy value into. 
*AUTOMATIC_Q*::
	*Y* (*y*) - automatic queue. *T* (*t*) - automatic and call is performed in 
    global transaction. *N*(*n*) - not automatic.
*TRIES*::
	Number of tires to send the message to 'SERVICE_NAME' service. I.e retry will be done in case
	if call returns the error. Parameter is used by automatic queues.
*INIT_WAIT*::
	Number of seconds to be waited before starting to send the message to service. Node that
	the minimum wait time is defined by tmqueue '-s' scan time flag which makes the periodic sleeps
	before scanning the messages to be sent. This is setting used by automatic queues.
*RETRY_WAIT*::
	Increase number of seconds to wait for next retry of forwarding message to service.
	This setting is used only by automatic queues.
*WAIT_MAX*::
	Maximum number of seconds to wait after taking in account 'RETRY_WAIT_INC'.
*MODE*::
	Queue mode, can be *fifo* or *lifo*. This setting affects 'tpdequeue()'.
*TXTOUT*::
    Transaction timeout, either global (target service call is made in within global
    transaction) if using *T* for 'autoq' or local timeout for transaction.


EXAMPLE
-------

Sample configuration:
---------------------------------------------------------------------
#
# @(#) EnduroX Persistent Queue Configuration
#
@,svcnm=-,autoq=n,waitinit=0,waitretry=0,waitretrymax=0,memonly=n,mode=fifo
# This will take other settings from default:
TESTA,svcnm=-,autoq=n,waitinit=5

# Automatic queue: Will try to send messages to TESTSVC
LTESTB,svcnm=TESTSVC,autoq=y,waitinit=1,waitretry=1,waitretrymax=0,memonly=n,mode=lifo
---------------------------------------------------------------------

When using common-configuration then above sample is moved to ini files. The sample section would look like:
(e.g. '/app/dir/conf/endurox.ini')
---------------------------------------------------------------------
#
# @(#) EnduroX Persistent Queue Configuration
#
[@queue]
@=svcnm=-,autoq=n,waitinit=0,waitretry=0,waitretrymax=0,memonly=n,mode=fifo
# This will take other settings from default:
TESTA=svcnm=-,autoq=n,waitinit=5

# Automatic queue: Will try to send messages to TESTSVC
LTESTB=svcnm=TESTSVC,autoq=y,waitinit=1,waitretry=1,waitretrymax=0,memonly=n,mode=lifo
---------------------------------------------------------------------

For common configuration sub-sections can be used by *cctag*, for example if you have following in your
ndrxconfig.xml:

---------------------------------------------------------------------
    <server name="tmqueue">
        <max>1</max>
        <srvid>1660</srvid>
	<cctag>qs1</cctag>
        <sysopt>-e /tmp/QS1.log -r -- -m QS1 -s1</sysopt>
    </server>
    <server name="tmqueue">
        <max>1</max>
        <srvid>1670</srvid>
	<cctag>qs2</cctag>
        <sysopt>-e /tmp/QS2.log -r -- -m QS2 -s1</sysopt>
    </server>
---------------------------------------------------------------------

Then queues can be defined in sub-section per server cctag, for example:

---------------------------------------------------------------------

#
#Q defaults (common)
#
[@queue]
@=svcnm=-,autoq=n,waitinit=0,waitretry=0,waitretrymax=0,memonly=n,mode=fifo

#
# manual queue, overridden to lifo
#
[@queue/qs1]
queue1=mode=lifo

#
# Automatic queue
#
[@queue/qs2]
queue2=svcnm=TESTSV,autoq=y,tries=3,waitinit=1,waitretry=5,waitretrymax=10
---------------------------------------------------------------------

BUGS
----
Report bugs to <EMAIL>

SEE ALSO
--------
*xadmin(8)*, *ndrxd(8)*, *ndrxconfig.xml(5)* *common_configuration(guides)*

COPYING
-------
(C) Mavimax, Ltd
<commit_msg>Updated on doc<commit_after>Q.CONF(5)
=========
:doctype: manpage


NAME
----
q.conf - Persistent, Transactional Message Queue (TMQ) configuration file


SYNOPSIS
--------
<QUEUE_NAME>,svcnm=<SERVICE_NAME>,autoq=<AUTOMATIC_Q>,tries=<TRIES>,waitinit=<INIT_WAIT>,waitretry=<RETRY_WAIT>,waitretrymax=<WAIT_MAX>,mode=<MODE>[,txtout=<TXTOUT>]


DESCRIPTION
-----------
'q.conf' defines the message queues for 'tmqueue'. The filename is passed to 'tmqueue' in 
application '-q' parameter. This file can be shared between multiple 'tmqueue' servers.
It is recommended to define default queue (special name is '@'). So that during 
operations if specific queue is not found, then settings are taken from 
default queue. The queue definitions also might not be complete. If so, then
defaults are used for other parameters. It is recommended to define default 
queue first. So that it can be using for other queue missing parameter defaulting.

Whitespace/empty lines are ignored. File may contains comments which are 
started at the beginning of the
line with '#' symbol.

If for automatic queues number of 'TRIES' attempts are exceeded for the message
(due to failed service calls), messages are deleted from queue space. 
Prior delete message may be put in failure queue if such is set in 
*tpenqueue(3)* parameter *TPQCTL.failurequeue* field and flag *TPQFAILUREQ* is
added to *TPQCTL.flags*.

DEBUG CONFIGURATION FILE SYNTAX
-------------------------------

*QUEUE_NAME>*::
	Queue name. For default queue use '@' symbol. Max name length is 15 symbols.
*SERVICE_NAME*::
	Service name to forward the message to. This is used for automatic queues. For manual queues
	you may put some dummy value into. 
*AUTOMATIC_Q*::
	*Y* (*y*) - automatic queue. *T* (*t*) - automatic and call is performed in 
    global transaction. *N*(*n*) - not automatic.
*TRIES*::
	Number of tires to send the message to 'SERVICE_NAME' service. I.e retry will be done in case
	if call returns the error. Parameter is used by automatic queues.
*INIT_WAIT*::
	Number of seconds to be waited before starting to send the message to service. Node that
	the minimum wait time is defined by tmqueue '-s' scan time flag which makes the periodic sleeps
	before scanning the messages to be sent. This is setting used by automatic queues.
*RETRY_WAIT*::
	Increase number of seconds to wait for next retry of forwarding message to service.
	This setting is used only by automatic queues.
*WAIT_MAX*::
	Maximum number of seconds to wait after taking in account 'RETRY_WAIT_INC'.
*MODE*::
	Queue mode, can be *fifo* or *lifo*. This setting affects 'tpdequeue()'.
*TXTOUT*::
    Transaction timeout, either global (target service call is made in within global
    transaction) if using *T* for 'autoq' or local timeout for transaction.


EXAMPLE
-------

Sample configuration:
---------------------------------------------------------------------
#
# @(#) EnduroX Persistent Queue Configuration
#
@,svcnm=-,autoq=n,waitinit=0,waitretry=0,waitretrymax=0,memonly=n,mode=fifo
# This will take other settings from default:
TESTA,svcnm=-,autoq=n,waitinit=5

# Automatic queue: Will try to send messages to TESTSVC
LTESTB,svcnm=TESTSVC,autoq=y,waitinit=1,waitretry=1,waitretrymax=0,memonly=n,mode=lifo
---------------------------------------------------------------------

When using common-configuration then above sample is moved to ini files. The sample section would look like:
(e.g. '/app/dir/conf/endurox.ini')
---------------------------------------------------------------------
#
# @(#) EnduroX Persistent Queue Configuration
#
[@queue]
@=svcnm=-,autoq=n,waitinit=0,waitretry=0,waitretrymax=0,memonly=n,mode=fifo
# This will take other settings from default:
TESTA=svcnm=-,autoq=n,waitinit=5

# Automatic queue: Will try to send messages to TESTSVC
LTESTB=svcnm=TESTSVC,autoq=y,waitinit=1,waitretry=1,waitretrymax=0,memonly=n,mode=lifo
---------------------------------------------------------------------

For common configuration sub-sections can be used by *cctag*, for example if you have following in your
ndrxconfig.xml:

---------------------------------------------------------------------
    <server name="tmqueue">
        <max>1</max>
        <srvid>1660</srvid>
	<cctag>qs1</cctag>
        <sysopt>-e /tmp/QS1.log -r -- -m QS1 -s1</sysopt>
    </server>
    <server name="tmqueue">
        <max>1</max>
        <srvid>1670</srvid>
	<cctag>qs2</cctag>
        <sysopt>-e /tmp/QS2.log -r -- -m QS2 -s1</sysopt>
    </server>
---------------------------------------------------------------------

Then queues can be defined in sub-section per server cctag, for example:

---------------------------------------------------------------------

#
#Q defaults (common)
#
[@queue]
@=svcnm=-,autoq=n,waitinit=0,waitretry=0,waitretrymax=0,memonly=n,mode=fifo

#
# manual queue, overridden to lifo
#
[@queue/qs1]
queue1=mode=lifo

#
# Automatic queue
#
[@queue/qs2]
queue2=svcnm=TESTSV,autoq=y,tries=3,waitinit=1,waitretry=5,waitretrymax=10
---------------------------------------------------------------------

BUGS
----
Report bugs to <EMAIL>

SEE ALSO
--------
*xadmin(8)*, *ndrxd(8)*, *ndrxconfig.xml(5)* *common_configuration(guides)*
*tpenqueue(3)* *tpdequeue(3)*

COPYING
-------
(C) Mavimax, Ltd

{'fraction_non_alphanumeric': 0.2198504819988196, 'fraction_numerical': 0.010131811922093252, 'mean_word_length': 2.613006396588486, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3913480', 'n_tokens_mistral': 3093, 'n_tokens_neox': 3049, 'n_words': 1025}