Implementation of message to enqueue/dequeue from/to queues.
More...
Implementation of message to enqueue/dequeue from/to queues.
- Restrictions:
- Qore::PO_NO_DATABASE
Advanced properties can be set to base hash.
◆ constructor()
Qore::Oracle::AQMessage::constructor |
( |
*hash |
obj | ) |
|
Create a message object.
- Parameters
-
obj | hash , or NOTHING . An Oracle object created with bindOracleObject |
◆ getAttemptCount()
int Qore::Oracle::AQMessage::getAttemptCount |
( |
| ) |
|
Return the number of attempts that have been made to dequeue the message.
- Return values
-
int | the count of dequeue attempts |
◆ getCorrelation()
string Qore::Oracle::AQMessage::getCorrelation |
( |
| ) |
|
Get the correlation identifier of the message.
- Return values
-
string | a correlation identifier |
◆ getEnqueueDelay()
int Qore::Oracle::AQMessage::getEnqueueDelay |
( |
| ) |
|
Return the number of seconds that a message is delayed for dequeuing.
- Return values
-
◆ getExpiration()
int Qore::Oracle::AQMessage::getExpiration |
( |
| ) |
|
Return the duration that the message is available for dequeuing.
- Parameters
-
◆ getObject()
*hash Qore::Oracle::AQMessage::getObject |
( |
| ) |
|
Get the qore hash from the message (Oracle NTY object)
- Return values
-
◆ getPriority()
int Qore::Oracle::AQMessage::getPriority |
( |
| ) |
|
Return the priority of the message.
- Return values
-
◆ getState()
int Qore::Oracle::AQMessage::getState |
( |
| ) |
|
Return the state of the message at the time of the dequeue.
- Return values
-
These constants are defined to handle this status:
- OCI_UNKNOWN : the function has failed to get the message state
- OCI_AMS_READY : the message is ready to be processed
- OCI_AMS_WAITING : the message delay has not yet completed
- OCI_AMS_PROCESSED : the message has been processed
- OCI_AMS_EXPIRED : the message has moved to exception queue
◆ setCorrelation()
nothing Qore::Oracle::AQMessage::setCorrelation |
( |
string |
c | ) |
|
Set the correlation identifier of the message.
- Parameters
-
c | a message correlation text |
Special pattern matching characters, such as "%" or "_" can be used. If more than one message satisfies the pattern, the order of dequeuing is undetermined.
◆ setEnqueueDelay()
nothing Qore::Oracle::AQMessage::setEnqueueDelay |
( |
int |
delay | ) |
|
Set the number of seconds to delay the enqueued message.
- Parameters
-
The delay represents the number of seconds after which a message is available for dequeuing. When the message is enqueued, its state is set to OCI_AMS_WAITING
. When the delay expires, its state is set to OCI_AMS_READY
.
If parameter 'value' is set to zero (default value), the message will be immediately available for dequeuing
◆ setExpiration()
nothing Qore::Oracle::AQMessage::setExpiration |
( |
int |
exp | ) |
|
Set the duration that the message is available for dequeuing.
- Parameters
-
exp | a expiration in seconds or -1 |
This parameter is an offset from the delay. While waiting for expiration, the message state is set to OCI_AMS_READY
. If the message is not dequeued before it expires, it will be moved to the exception queue with the state OCI_AMS_EXPIRED
. If parameter 'value' is set to -1 (default value), the message will not expire
◆ setObject()
nothing Qore::Oracle::AQMessage::setObject |
( |
hash |
h | ) |
|
Set hash
as Oracle object for this message instance.
- Parameters
-
obj | hash , or NOTHING . An Oracle object created with bindOracleObject |
◆ setPriority()
nothing Qore::Oracle::AQMessage::setPriority |
( |
int |
prio | ) |
|
Set the priority of the message.
- Parameters
-
The priority can be any number, including negative numbers. A smaller number indicates higher priority. Default value is zero.
The documentation for this class was generated from the following file:
- /Users/david/src/qore/git/module-oracle/src/QC_AQMessage.dox.h