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.
    TPEBLOCK - Blocking condition exists and TPNOBLOCK was specified.
    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:
Returns:

  • TPQCTL – Return control structure (updated with details).

  • dict – ATMI data buffer.