endurox.tpdequeue¶
- endurox.tpdequeue(qspace: str, qname: str, ctl: endurox.TPQCTL, flags: int = 0) Tuple[endurox.TPQCTL, object] ¶
Dequeue message from persistent queue.
tpdequeue example¶qctl = e.TPQCTL() qctl.flags=e.TPQGETBYCORRID qctl.corrid=b'\x01\x02' qctl, retbuf = e.tpdequeue("SAMPLESPACE", "TESTQ", qctl) print(retbuf["data"])
For more details see tpdequeue(3).
See tests/test003_tmq/runtime/bin/tpenqueue.py for sample code.
- Raises:
AtmiException –
Following error codes may be present:TPEINVAL
- Invalid arguments to function (See C descr).TPENOENT
- Queue space not found (tmqueue process for qspace not started).TPETIME
- Queue space call timeout.TPESVCFAIL
- Queue space server failed.TPESVCERR
- Queue space server crashed.TPESYSTEM
- System error.TPEOS
- OS error.TPETRAN
- Failed to join global transaction.QmException –
Following error codes may be present:QMEINVAL
- Invalid request buffer or qctl.QMEOS
- OS error.QMESYSTEM
- System error.QMEBADQUEUE
- Bad queue name.QMENOMSG
- No messages in
- Parameters:
qspace (str) – Queue space name.
qname (str) – Queue name.
ctl (TPQCTL) – Control structure.
data (dict) – Input ATMI data buffer
flags (int) – Or’d bit flags:
TPNOTRAN
,TPSIGRSTRT
,TPNOCHANGE
,TPNOTIME
,TPNOBLOCK
. Default flag is 0.
- Returns:
TPQCTL – Return control structure (updated with details).
dict – ATMI data buffer.