Most queue types hold messages in a persistent store, for example a hard
disk. While in the store, the state of the message varies as it is transferred
into and out of the store. As shown in
Figure 1:
Figure 1. Stored message state flow
In this diagram, "start" and "deleted"
are not actual message states. They are the entry and exit points of the state
model. The message states are:
- Put unConfirmed
- A message is put to the message store
of a queue with a confirmID. The message is effectively hidden
from all actions except confirmPutMessage or undo.
- Unlocked
- A message has been put to a queue and is available to all operations.
- Locked for Browse
- A browse with lock retrieves messages. Messages are hidden from all queries
except getMessage, unlock, delete, undo,
and unlockMessage. A lockID is returned
from the browse operation. You must supply this lockID to
all other operations.
- Get Unconfirmed
- A getMessage call has been made with a confirmID,
but the get has not been confirmed. The message is invisible to all queries
except confirmGetMessage, confirm, and undo.
Each of these actions requires the inclusion of the matching confirmID to
confirm the get.
- Browse Get Unconfirmed
- A message got while it is locked for browse. You can do this only by passing
the correct lockID to the getMessage function.
On an asynchronous remote queue, other states exist where a
message is being transmitted to another machine. These states are entered
as "unlocked", that is only confirmed messages are transmitted.