The queue manager is the focal point of the Websphere MQ Everyplace Native C Client system. It provides
Data Structures | |
struct | MQeQMgrQParms |
Configuration Structure for creating a QueueManager Queue. More... | |
struct | MQeQueueManagerParms |
Configuration Structure for processing a QueueManager. More... | |
Defines | |
#define | QMGR_VERSION |
QueueManager structure version. | |
#define | QMGR_INIT_VAL |
initial value for the Queue Manager parameter structure | |
#define | SET_QMGR_INIT_VAL(qmParms) |
#define | QMGR_DESC_OP |
bit flag for the structure description field | |
#define | QMGR_RULES_OP |
bit flag for the structure QMgr rules field | |
#define | QMGR_TIMEOUT_OP |
bit flag for the structure timeout field | |
#define | QMGR_Q_STORE_OP |
bit flag for the structure queue store field | |
#define | QMGR_QUEUES_OP |
bit flag for the structure queues field | |
#define | QMGR_CONNECTIONS_OP |
bit flag for the structure connections field | |
#define | QMGR_BRIDGE_CAPABLE_OP |
bit flag for the structure bridge capable field | |
#define | QMGR_ALIASES_OP |
bit flag for the structure aliases field | |
#define | QMGR_CHANNEL_ATTRIBUTE_OP |
bit flag for the structure aliases field | |
#define | QMGR_VERSION_OP |
bit flag for the structure version field | |
#define | QMGR_ALL_OP |
mask for all bit flags for the structure | |
Typedefs | |
typedef enum MQeQueueType_enm | MQeQueueType |
Used to identify the type of queue in admininstration operations. | |
typedef MQeQMgrQParms | MQeQMgrQParms |
Configuration Structure for creating a QueueManager Queue. | |
typedef MQeQueueManagerParms | MQeQueueManagerParms |
Configuration Structure for processing a QueueManager. | |
Enumerations | |
enum | MQeQueueType_enm { MQEQUEUETYPE_UNKNOWN, MQEQUEUETYPE_LOCAL, MQEQUEUETYPE_ADMIN, MQEQUEUETYPE_REMOTE_SYNC, MQEQUEUETYPE_REMOTE_ASYNC, MQEQUEUETYPE_HOME_SERVER, MQEQUEUETYPE_REMOTE_GENERIC, MQEQUEUETYPE_STORE_AND_FORWARD } |
Used to identify the type of queue in admininstration operations. More... | |
Functions | |
MQERETURN | mqeQueueManager_new (MQeExceptBlock *pExceptBlock, MQeQueueManagerHndl *phQMgr, MQeStringHndl hQmgrName, MQeQueueManagerParms *pQMParms, MQeRegistryParms *pRegParms) |
Creates a new QueueManager form an existing registry. | |
MQERETURN | mqeQueueManager_free (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock) |
Frees the queue manager pointed to by pQMgr. | |
MQERETURN | mqeQueueManager_start (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock) |
This starts the QueueManager running. | |
MQERETURN | mqeQueueManager_browseMessages (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQeVectorHndl *phMsgs, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter, MQeFieldsAttrHndl hAttribute, MQEBOOL justUID) |
Returns a vector of the messages (or just their UIDs) available on a specified queue. | |
MQERETURN | mqeQueueManager_browseMessagesAndLock (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQeVectorHndl *phMsgs, MQEINT64 *pLockID, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter, MQeFieldsAttrHndl hAttribute, MQEINT64 confirmId, MQEBOOL justUID) |
Returns a Vector of the messages (or just their UIDs) available on a specified queue. | |
MQERETURN | mqeQueueManager_checkActive (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQEBOOL *pIsActive) |
Checks if queue manager is active. | |
MQERETURN | mqeQueueManager_stop (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock) |
Stops a QueueManager. | |
MQERETURN | mqeQueueManager_getCurrentQueueManager (MQeExceptBlock *pExceptBlock, MQeQueueManagerHndl *phQueueManager) |
Returns current QueueManager. | |
MQERETURN | mqeQueueManager_confirmGetMessage (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter) |
Confirms the successful receipt of a message. | |
MQERETURN | mqeQueueManager_confirmPutMessage (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter) |
Confirms a previous mqeQueueManager_putMessage_ operation. | |
MQERETURN | mqeQueueManager_deleteMessage (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter) |
Deletes a message from a queue. | |
MQERETURN | mqeQueueManager_getMessage (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQeFieldsHndl *phMsg, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter, MQeFieldsAttrHndl hAttribute, MQEINT64 confirmId) |
Returns an available message from the specified queue. | |
MQERETURN | mqeQueueManager_getName (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQeStringHndl *phQMgrName) |
Returns Queue manager name. | |
MQERETURN | mqeQueueManager_putMessage (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQeFieldsHndl hMsg, MQeFieldsAttrHndl hAttribute, MQEINT64 confirmId) |
Puts a message onto a queue. | |
MQERETURN | mqeQueueManager_triggerTransmission (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock) |
This function causes an attempt to transmit any pending messages. | |
MQERETURN | mqeQueueManager_channelTimeout (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock) |
This function causes a check to be made on all channels for timeout. | |
MQERETURN | mqeQueueManager_undo (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQEINT64 confirmId) |
Undoes a put, get,or browseAndLock action during which an error occurs. | |
MQERETURN | mqeQueueManager_unlockMessage (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter) |
Unlocks a message that has been previously locked. |
|
initial value for the Queue Manager parameter structure
{QMGR_VERSION, 0, NULL, NULL, 0, NULL, NULL, NULL, MQE_FALSE} |
|
Is this QueueManager bridge capable? |
|
Configuration Structure for creating a QueueManager Queue. A structure which contains the information that is required to process a Queue Manager Queue. |
|
Configuration Structure for processing a QueueManager. A structure which contains the information that is required to process a Queue Manager. It needs to contain information on the registry and default QueueManager QueueStore. |
|
|
Creates a new QueueManager form an existing registry.
This will create a new QueueManager based on the information in an existing registry (the information required to do this is supplied in the MQeRegistryParms). Once this has been created, it can be started using the mqeQueueManager_start() method. If the registry does not exist, then an error will be generated. To create a brand new QueueManager use the mqeAdministrator_QueueManager_create() method.
|
|
Frees the queue manager pointed to by pQMgr.
|
|
This starts the QueueManager running.
Once this call has been made messaging operations can begin. This call should be made either after creating a QueueManager from an existing registry or when re-establishing a QueueManager from an existing registry.
|
|
Returns a vector of the messages (or just their UIDs) available on a specified queue.
Returns a vector of the messages available on a specified queue. The messages are not deleted from the queue. The queue can belong to a local or remote queue manager. A filter can be specified, which consists of message fields, so that only messages that have matching fields are returned. Returning a vector of messages in their entirety can be expensive in terms of system resources, so if the justUID parameter is set to true just the unique ids of the messages that match the filter are returned. These unique ids can then be used as filters to get/delete/browse the entire messages on the target queue. Specifying an MQeAttribute handle allows browsing of messages that have message-level security defined with a matching attribute. When an attribute is specified in a get/browse message call, it is the caller's responsibilty to make sure that the specified attribute is appropriate for decoding the message/(ALL) messages. That includes the type of attribute, type of key, value of key seed, type of authenticator, type of cryptor, and type of compressor. Note that problems may arise if the attribute supplied is not appropriate for decoding all messages returned by the operation. However, if you omit compressor and cryptor when creating an MQeMsgAttr, the system will automatically load the appropriate ones for the operation. The messages returned in the enumeration are still visible to other Websphere MQ Everyplace applications. Therefore, when performing subsequent operations on the messages contained in the array, the application should be aware that it is possible for another application to have processed these messages in the time since the array was returned. To lock the messages contained in the array, therefore preventing other applications from processing them, use the mqeQueueManager_browseMessagesAndLock() function. As the Vector contains MQeFieldsHndl, freeing the Vector will automatically free any fields objects it contains at the point of freeing
|
|
Returns a Vector of the messages (or just their UIDs) available on a specified queue.
The messages are not deleted from the queue. The queue may belong to a local or remote queue manager. A filter can be specified, which consists of message fields, so that only messages that have matching fields are returned. Any messages that are returned by this function are also locked on the queue. This means that these messages still exist on the queue, but they are not visible to any subsequent operations, until they are unlocked. A lock id is returned as part of this the browse call. The lock ID allows operations to be performed on locked messages so long as it is specified as part of the message filter that is passed into that operation. Lock ids are unique, so every browse and lock operation generates a different id. The lock id applies to all the messages that are returned by the browse operation. The operations that can be performed on a locked message are: mqeQueueManager_getMessage(), mqeQueueManager_deleteMessage(), mqeQueueManager_unlockMessage() Returning an enumeration of messages in their entirety can be expensive in terms of system resources, so if the justUID parameter is set to true just the unique ids of the messages that match the filter are returned. These unique ids can then be used as filters to get/delete/browse the entire messages on the target queue. Specifying an MQeAttribute handle allows browsing of messages that have message-level security defined with a matching attribute. When an attribute is specified in a get/browse message call, it is the caller's responsibilty to make sure that the specified attribute is appropriate for decoding the message/(ALL) messages. That includes the type of attribute, type of key, value of key seed, type of authenticator, type of cryptor, and type of compressor. Note that problems may arise if the attribute supplied is not appropriate for decoding all messages returned by the operation. However, if you omit compressor and cryptor when creating an MQeMsgAttr, the system will automatically load the appropriate ones for the operation. The confirmID is used in the event of an error while executing this command. The error could occur before the lock id is returned to the application and yet leave the messages in a locked state on the target queue. Passing the same confirm id used on this method to the undo method restores the messages to their previous state. It is recommended that a unique value be used for each browse and lock operation. A unique value can be generated using the MQe_uniqueValue().
|
|
Checks if queue manager is active.
|
|
Stops a QueueManager.
This will stop a QueueManager - it will no longer be able to accept any messages
|
|
Returns current QueueManager.
|
|
Confirms the successful receipt of a message.
Confirms the successful receipt of a message that was retrieved from a queue by a previous mqeQueueManager_getMessage operation. The message remains locked on the target queue until the confirm flow is received.
|
|
Confirms a previous mqeQueueManager_putMessage_ operation.
|
|
Deletes a message from a queue.
This function does not return the message to the application that called it. Only one message can be deleted per operation and the unique id(timestamp and origin queue manager name) of the message must always be supplied. The queue may belong to a local or remote Websphere MQ Everyplace queue manager. Messages that have been locked by a previous operation (browse for example) can be deleted by including a valid lock id in the message filter. If the message is not available, an error is raised.
|
|
Returns an available message from the specified queue.
Returns an available message from the specified queue and the message is removed from the queue. The queue can belong to a local or a remote Websphere MQ Everyplace queue manager. If no message filter is specified, the first available message on the queue is returned. If a message filter is specified, the first available message that matches the filter is returned. Messages that have been locked by a previous browse operation can be retrieved by including, in the message filter, the lock id that was used to lock the message. If no message is available, an error is raised. The use of assured message delivery is dependant upon the value of the confirmId parameter. Passing a nonzero confirm Id returns the message as normal, but the message is locked and is not removed from the target queue until a subsequent confirm is received. A confirm can be issued using the mqeQueueManager_confirmGetMessage() method. Passing a confirm Id of zero returns the message and removes it from the target queue - however, the message delivery is not assured in this case. The confirmId parameter is also used in the event of an error when executing this command. A failure could occur before the message is returned to the application and yet leave the message in a locked state on the target queue. Passing the same confirm id used for the get operation to the undo call restores the message to its previous state. It is recommended that a unique value be used for each get operation. A unique value can be generated using the mqe_uniqueValue() method.
|
|
Returns Queue manager name.
|
|
Puts a message onto a queue.
This function places the specified message onto the specified queue. This queue may belong to a local or a remote queue manager. Puts to remote queues can occur immediately, or at some later time depending upon how the remote queue is defined on the local queue manager. If a remote queue is defined as synchronous, the transmission of the message over the network occurs immediately. If a remote queue is defined as asynchronous, the message is stored within the local queue manager. The message remains there until the queue manager rules decide that it is time to transmit any pending messages or the queue manager is triggered through the mqeQueueManager_triggerTransmission() method. The assured delivery of the message is dependent on the value of the confirmId parameter. Passing a nonzero value transmits the message as normal, but the message is locked on the target queue until a subsequent confirm is received. Passing a value of zero transmits the message without the need for a subsequent confirm, however the delivery of the message is not assured. The confirmId is also used in the event of an error during the execution of this command. Passing the same confirm id used for the put operation to the undo method removes the unconfirmed message from the target queue. It is recommended that a unique value be used for each put operation. A unique value can be generated using the mqe_uniqueValue() method. A message can be protected using message-level security. The security is defined by providing an MQeAttribute_ handle, or one of its descendants. The attribute can be attached to the message prior to any put message request, or the attribute parameter can be used to specify the message-level security to be used. If the attribute parameter is not null, the value overrides any attribute attached to the message prior to the put message request. If the attribute parameter is null, it has no effect on the sending of the message.
|
|
This function causes an attempt to transmit any pending messages.
Pending messages are messages awaiting transmission to remote queue managers. This method allows transmission of pending messages at a time convenient to the application. In addition, this method triggers any home server queues that are defined. These queues attempt to collect messages from their home servers.
|
|
This function causes a check to be made on all channels for timeout.
Each channel is checked to see if the time since the last write or read is greater than the timeout value. If it is, the channel is closed.
|
|
Undoes a put, get,or browseAndLock action during which an error occurs.
It is possible that an error could leave messages in an unconfirmed or locked state on the target queue. This method resets the messages to the state (either locked or unlocked) that they were in prior to the failed operation, or in the case of an unconfirmed put operation, the messages are deleted. To reset a message, it is necessary to supply the confirmId that was used in the failed operation. It is recommended that confirm ids are unique for each message operation. A unique value can be generated using the mqe_uniqueValue() method.
|
|
Unlocks a message that has been previously locked.
This function makes a message visible once again to all applications. Only one message can be unlocked at a time and both the unique id (timestamp and origin queue manager name) and lock id of the message must be supplied. The queue may belong to a local or remote queue manager. If the message is not available, an exception is thrown. This method would typically be used in conjunction with the mqeQueueManager_browseMsgAndLock() method.
|