-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Hello, I recently upgraded my ibmmq package version to v2.1.0 and getting following error while trying to use the Get operation to read messages from the queue
(MQError) GET[async]: MQCC = MQCC_FAILED [2] MQRC = MQRC_ENVIRONMENT_ERROR [2012]
I have able to subscribe to the queue using Get Operation correctly with version v1.0.6. Note, that I have disabled useCtl so that Get operation does not require Ctl to finish reading messages using setTuningParameters({ useCtl: false });
Here is the code block I am using to subscribe to the queue.
async createSubscription(queueName) {
const objectDescriptor = new MQOD();
objectDescriptor.ObjectType = MQC.MQOT_Q;
objectDescriptor.ObjectName = queueName;
const queue = await OpenPromise(
await this.connectionHandle,
objectDescriptor,
MQC.MQOO_INPUT_AS_Q_DEF,
);
this.logger.debug('createSubscription', { queueName });
const getMessageOptions = new MQGMO();
getMessageOptions.Options = (
MQC.MQGMO_NO_SYNCPOINT |
MQC.MQGMO_WAIT |
MQC.MQGMO_FAIL_IF_QUIESCING |
MQC.MQGMO_CONVERT
);
getMessageOptions.MatchOptions = MQC.MQMO_NONE;
getMessageOptions.WaitInterval = MQC.MQWI_UNLIMITED;
Get(
queue,
new MQMD(),
getMessageOptions,
(error, ...message) => {
if (error instanceof Error) {
throw new Error(error);
}
return message;
},
);
}
Metadata
Metadata
Assignees
Labels
No labels