libndrxxaqdisks — Enduro/X TMQ static XA switch loader libndrxxaqdiskd - Enduro/X TMQ dynamic registration XA switch loader
libndrxxaqdisks.so libndrxxaqdiskd.so
NDRX_XA_RES_ID=1 NDRX_XA_OPEN_STR=datadir="/path/to/data/directory",qspace="SAMPLESPACE" NDRX_XA_CLOSE_STR=$NDRX_XA_OPEN_STR NDRX_XA_DRIVERLIB=libndrxxaqdisks.so NDRX_XA_RMLIB=libndrxxaqdisk.so NDRX_XA_LAZY_INIT=1 [NDRX_XA_FLAGS=[FSYNC|FDATASYNC][;DSYNC]]
This is Enduro/X tmqueue(8) XA driver loader and actual disk based message queue driver. The actual logic is implemented in libndrxxaqdisk library. All following text describes the work logic of libndrxxaqdisk.
The Open String NDRX_XA_OPEN_STR contains comma separated parameters. The value for parameters may be put in single or double quotes.
The Open string specifies the the data directory in datadir parameter, where the transaction and message data is kept. The queue space name is specified in qspace parameter.
WARNING: the data directory (dataadir) cannot be shared between different queue spaces.
The XA switch provided libndrxxaqdisk is used by tmqueue(8) and tmsrv(8) processes. XA operations are processed in following way:
When library is started, it prepare the following directories, under the NDRX_XA_OPEN_STR:
NDRX_XA_OPEN_STR specified directory cannot be shared between different tmqueue(8) processes having different NDRX_XA_RES_ID.
Command block files have following types:
Each command block file refers to one message only, thus sequence numbers are used for keeping them linked to one global. Thought this architecture partially breaks the Atomicity property of ACID, as committed or rollbacked messages in queue appears one by one, instead of all by once.
To ensure that messages does not corrupt in case of power outage, disk synchronization NDRX_XA_FLAGS configuration may be set (the default is not set):
NB: If using FSYNC, FDATASYNC, DSYNC expect performance impact of the message processing.
Operations with disk are following for tpenqueue(3):
Operations with disk are following for tpdequeue(3):