|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQRCCF_COMMAND_LENGTH_ERROR when using MQCACF_COMMAND_SCOPE |
« View previous topic :: View next topic » |
Author |
Message
|
deliego |
Posted: Wed Jun 16, 2021 10:17 am Post subject: MQRCCF_COMMAND_LENGTH_ERROR when using MQCACF_COMMAND_SCOPE |
|
|
Newbie
Joined: 16 Jun 2021 Posts: 5
|
Hi everyone,
I currently have this code, which works when I run it against a QM member in a QSG on MQ 9.2.0, but fails when I run it on another QM in a QSG on MQ 9.0.0.
The error I get is 3230: Code: MQCC_FAILED, Reason: MQRCCF_COMMAND_LENGTH_ERROR
But if I remove this line:
Code: |
pcfMessageRequest.addParameter(MQConstants.MQCACF_COMMAND_SCOPE, "*"); |
then it works fine on 9.0.0
Code: |
PCFMessage pcfMessageRequest = new PCFMessage(MQConstants.MQCMD_INQUIRE_Q_NAMES);
pcfMessageRequest.addParameter(MQConstants.MQCA_Q_NAME, "*");
pcfMessageRequest.addParameter(MQConstants.MQIA_Q_TYPE, MQConstants.MQQT_LOCAL);
pcfMessageRequest.addParameter(MQConstants.MQCACF_COMMAND_SCOPE, "*");
try {
PCFMessage[] pcfMessageResponses = pcfMessageAgent.send(pcfMessageRequest);
for (PCFMessage response : pcfMessageResponses) {
String[] queueNames = response.getParameter(MQConstants.MQCACF_Q_NAMES).getStringValue().split("\n");
for (String queueName : queueNames) {
queuesResult.add(queueName.trim());
}
}
}
} catch (MQDataException ex) {
String errorMessage = String.format("Code: %s, Reason: %s",
MQConstants.lookupCompCode(ex.getCompCode()),
MQConstants.lookupReasonCode(ex.getReason()));
logger.error("Could not inquire queue names for *. " + errorMessage);
}
|
So why would it complain about the command being so large just by adding the command scope "*"?
Also, I am using com.ibm.mq.allclient:9.2.2.0
Any help is much appreciated.
Thanks! |
|
Back to top |
|
 |
RogerLacroix |
Posted: Fri Jun 18, 2021 12:11 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
The command server is really picky about the order of parameters. The MQ Knowledge Center for Inquire Queue Names shows that CommandScope should be the 2nd parameter.
Try the following:
Code: |
PCFMessage pcfMessageRequest = new PCFMessage(MQConstants.MQCMD_INQUIRE_Q_NAMES);
pcfMessageRequest.addParameter(MQConstants.MQCA_Q_NAME, "*");
pcfMessageRequest.addParameter(MQConstants.MQCACF_COMMAND_SCOPE, "*");
pcfMessageRequest.addParameter(MQConstants.MQIA_Q_TYPE, MQConstants.MQQT_LOCAL);
PCFMessage[] pcfMessageResponses = pcfMessageAgent.send(pcfMessageRequest); |
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
deliego |
Posted: Fri Jun 18, 2021 12:42 pm Post subject: |
|
|
Newbie
Joined: 16 Jun 2021 Posts: 5
|
I did not know that there was a specific order for these parameters
I will try your suggestion and post an update.
Thanks! |
|
Back to top |
|
 |
deliego |
Posted: Thu Jun 24, 2021 5:04 am Post subject: |
|
|
Newbie
Joined: 16 Jun 2021 Posts: 5
|
|
Back to top |
|
 |
deliego |
Posted: Mon Aug 16, 2021 8:57 am Post subject: |
|
|
Newbie
Joined: 16 Jun 2021 Posts: 5
|
Looks like I spoke too soon, and according to IBM's doc here:
https://www.ibm.com/docs/en/ibm-mq/9.0?topic=formats-inquire-queue-names
Quote: |
"When a value other than blank is specified, the maximum response size is limited to 32KB from each queue manager. If the response from a queue manager would be larger than this, an error response with reason code MQRCCF_COMMAND_LENGTH_ERROR (3230) is returned by that queue manager." |
Does anyone know of a workaround to this limit? |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Aug 16, 2021 10:22 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
From the URL you posted:
Quote: |
When a value other than blank is specified, the maximum response size is limited to 32KB from each queue manager. If the response from a queue manager would be larger than this, an error response with reason code MQRCCF_COMMAND_LENGTH_ERROR (3230) is returned by that queue manager. |
One of the qmgrs is returning more than 32K in violation of the 32K limit. You may need to modify your app to request only from a subset of QMs per inquire call.
Out of curiosity, how many qmgrs in the QSG? How many queues? Anything in the qmgr syslog at the time of the r/c 3230? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
deliego |
Posted: Tue Aug 17, 2021 5:36 am Post subject: |
|
|
Newbie
Joined: 16 Jun 2021 Posts: 5
|
I ended up making two calls, one for all regular queue names, and the other for queues with QSG_DISP = SHARED to get only the shared ones.
There are 4 QMs as part of the same QSG. They range from 445 to 660 queues each.
Thanks! |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|