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. | |
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) |
This function constructs/activates a queue manager. | |
MQERETURN | mqeQueueManager_free (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock) |
Frees the queue manager pointed to by pQMgr. | |
MQERETURN | mqeQueueManager_activate (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQECONST MQeFieldsHndl hStartUpParams) |
This function activates a WMQe queue manager. | |
MQERETURN | mqeQueueManager_addMessageListener (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQECONST MQeMessageListenerHndl hListener, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter) |
Adds a subscription to MQSeries Everyplace Message Events. | |
MQERETURN | mqeQueueManager_browseMessages (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQeMessageEnumerationHndl *phMsgs, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter, MQeAttributeHndl hAttribute, MQEBOOL justUID) |
Returns an Enumeration of the messages (or just their UIDs) available on a specified queue. | |
MQERETURN | mqeQueueManager_browseMessagesAndLock (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQeMessageEnumerationHndl *phMsgs, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter, MQeAttributeHndl hAttribute, MQEINT64 confirmId, MQEBOOL justUID) |
Returns an enumeration 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_close (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock) |
Closes down the queue manager pointed by pQMgr. | |
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, MQeMsgHndl *phMsgs, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter, MQeAttributeHndl 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_getReference (MQeExceptBlock *pExceptBlock, MQeQueueManagerHndl *phQMgrRef, MQECONST MQeStringHndl hQMgrName) |
Reference to a named queue Manager. | |
MQERETURN | mqeQueueManager_putMessage (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQeMsgHndl hMsg, MQeAttributeHndl hAttribute, MQEINT64 confirmId) |
Puts a message onto a queue. | |
MQERETURN | mqeQueueManager_removeMessageListener (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQECONST MQeMessageListenerHndl hListener, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter) |
Removes a message listener. | |
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. | |
MQERETURN | mqeQueueManager_waitForMessage (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQeMsgHndl *phMsgs, MQECONST MQeStringHndl hQMgrName, MQECONST MQeStringHndl hQName, MQECONST MQeFieldsHndl hFilter, MQeAttributeHndl hAttribute, MQEINT64 confirmId, MQEINT32 millisecs) |
Waits for message arriving on queue. | |
MQERETURN | mqeQueueManager_setGlobalHashtable (MQeQueueManagerHndl hQMgr, MQeExceptBlock *pExceptBlock, MQeHashtableHndl hHashTable) |
Set Channelmanager GlobalHashTable reference. |
The queue manager is the focal point of the Websphere MQ Everyplace Native C Client system. It provides
|
A structure which contains the information that is required to process a Queue Manager Queue. |
|
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. |
|
|
If hStartUpParams (handle for the queue manager startup parameters) is not NULL, (*hStartUpParams) is used to activate the created queue manager. by calling mqeQueueManager_activate() internally. Otherwise, it just creates a default queue manager. The mqeQueueManager_activate() function must be called later to initialize and start the queue manager. Before starting a queue manager all required MQSeries Everyplace aliases must have been added. Refer to the Programming Guide for details of how to do this.
|
|
|
|
Before starting a queue manager, all required WMQE aliases must have already been added.
MQE_QUEUE_MANAGER_NAME An ascii string containing the queue Manager's unique name. This name must:
Uppercase A-Z, lowercase a-z, Numerics 0-9, Periods, Underscores, Percent Sign MQE_REGISTRY_SECTION
|
|
Registers an handle as a listener to any MQeMessage events generated by the queue specified in the hQName parameter. It is only possible to add listeners to local queues.
|
|
Returns an Enumeration 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 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/waitFor 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. Please see the documentation for MQeMessageEnumeration for information on how it can be used.
|
|
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() and mqeQueueManager_waitForMessage(). 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 /waitFor 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().
|
|
|
|
This function should be called by WMQe applications when they have finished using the queue manager.
|
|
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.
|
|
|
|
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 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.
|
|
|
|
If hQMgrName is null then the Default queue manager for is returned.
|
|
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. If the local queue manager does not hold a definition of the remote queue then it attempts to contact the queue synchronously. 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 removes an handles subscription to Websphere MQ Everyplace message events generated by the queue specified in queueName. It is only possible to have listeners on local queues.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
This function works in an identical manner to mqeQueueManager_getMessage(). However, if no message is available, the method waits for the period of time specified by millisecs milliseconds. If no message is available at the end of this period, an error is raised.
|
|
|