endurox.tpenqueue

endurox.tpenqueue(qspace: str, qname: str, ctl: endurox.TPQCTL, data: object, flags: int = 0) endurox.TPQCTL

Enqueue message to persistent message queue.

tpenqueue example
    qctl = e.TPQCTL()
    qctl.corrid=b'\x01\x02'
    qctl.flags=e.TPQCORRID
    qctl1 = e.tpenqueue("SAMPLESPACE", "TESTQ", qctl, {"data":"SOME DATA 1"})

For more details see tpenqueue(3) C API call.

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).
    TPETIME - Queue space call timeout.
    TPENOENT - Queue space not found.
    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.
    QMEOS - OS error.
    QMESYSTEM - System error.
    QMEBADQUEUE - Bad queue name.

Parameters:
Returns:

Return control structure (updated with details).

Return type:

TPQCTL