Example (C) - assured put

A skeleton version of the code required for an assured put is shown below:

  /* generate confirm Id */
  MQEINT64 confirmId;
  rc = mqe_uniqueValue(&exceptBlock,
                       &confirmId);
  
  /* put message to queue using this confirm Id */
  if(MQERETURN_OK == rc) {
      rc = mqeQueueManager_putMessage(hQMgr,
                           &exceptBlock,
                           hQMgrName, hQName,
                           hMsg, NULL, confirmId);
      /* now confirm the message put */
      if(MQERETURN_OK == rc) {
          /* first get the message uid fields */
             MQeFieldsHndl hFilter;
             rc = mqeFieldsHelper_getMsgUidFields(hMsg,
                                   &exceptBlock,
                                  &hFilter);
            if(MQERETURN_OK == rc) {
              rc = mqeQueueManager_confirmPutMessage(hQMgr,
                                   &exceptBlock,
                                   hQMgrName,
                                   hQName, hFilter);
            }
      }
  }

Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.