Author |
Message
|
ZortHNET |
Posted: Tue Aug 04, 2009 7:06 am Post subject: MQ: Get large message using JMS |
|
|
Newbie
Joined: 04 Aug 2009 Posts: 4
|
How can I get large messages using JMS?
Another application send a message of 19 MB to a queue. So the queue support large messages, correct?
But when I can GET I receive this error:
MQJE001: Completion Code 2, Reason 2010
MQJMS2002: failed to get message from MQ queue
How to fix that?
In connection I set only:
hostName, queueManager, channel, port and transportType |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Tue Aug 04, 2009 7:26 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Check the max message length on the channel that your application is using to connect. |
|
Back to top |
|
 |
zpat |
Posted: Tue Aug 04, 2009 7:58 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Quote: |
Reason Code 2010 x'7DA'
MQRC_DATA_LENGTH_ERROR
The DataLength parameter is not valid. Either the parameter pointer is not valid, or it points to read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.) This reason can also be returned to an MQ client program on the MQGET, MQPUT, or MQPUT1 call, if the BufferLength parameter exceeds the maximum message size that was negotiated for the client channel.
Corrective action: Correct the parameter. If the error occurs for a WebSphere MQ client program, also check that the maximum message size for the channel is big enough to accommodate the message being sent; if it is not big enough, increase the maximum message size for the channel.
|
|
|
Back to top |
|
 |
ZortHNET |
Posted: Tue Aug 04, 2009 9:12 am Post subject: |
|
|
Newbie
Joined: 04 Aug 2009 Posts: 4
|
zpat wrote: |
Quote: |
Reason Code 2010 x'7DA'
MQRC_DATA_LENGTH_ERROR
The DataLength parameter is not valid. Either the parameter pointer is not valid, or it points to read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.) This reason can also be returned to an MQ client program on the MQGET, MQPUT, or MQPUT1 call, if the BufferLength parameter exceeds the maximum message size that was negotiated for the client channel.
Corrective action: Correct the parameter. If the error occurs for a WebSphere MQ client program, also check that the maximum message size for the channel is big enough to accommodate the message being sent; if it is not big enough, increase the maximum message size for the channel.
|
|
Zpat, I believe that JMS don't have DataLength and BufferLength parameters. Only MQ Client. |
|
Back to top |
|
 |
ZortHNET |
Posted: Tue Aug 04, 2009 9:23 am Post subject: |
|
|
Newbie
Joined: 04 Aug 2009 Posts: 4
|
WMBDEV1 wrote: |
Check the max message length on the channel that your application is using to connect. |
Ok, but another application already sent a message of 19 MB to the MQ.
Nevertheless MQ settings may not be ok? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 04, 2009 9:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ZortHNET wrote: |
WMBDEV1 wrote: |
Check the max message length on the channel that your application is using to connect. |
Ok, but another application already sent a message of 19 MB to the MQ.
Nevertheless MQ settings may not be ok? |
If they're using a different set of objects that have been correctly configured to accept 19MB messages then yes it will work for them. So as my most worthy associate points out, check the max message length you are using. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ZortHNET |
Posted: Tue Aug 04, 2009 10:06 am Post subject: |
|
|
Newbie
Joined: 04 Aug 2009 Posts: 4
|
How can I check that?
What parameters?
obs: the other application use MQ Client to sent 19 MB to a queue and I must read using JMS. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 04, 2009 10:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ZortHNET wrote: |
How can I check that? |
Use the administration interface, or ask the MQ admin to do it.
ZortHNET wrote: |
What parameters? |
MaxMessageLength as you've been told before
ZortHNET wrote: |
obs: the other application use MQ Client to sent 19 MB to a queue and I must read using JMS. |
Is your JMS application using a client connection like the other application? There's no difference between a C application and a Java application using a client connection. Like there's no difference between the 2 languages using a server connection. It's just about coding. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 04, 2009 6:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Vitor wrote: |
Is your JMS application using a client connection like the other application? There's no difference between a C application and a Java application using a client connection. Like there's no difference between the 2 languages using a server connection. It's just about coding. |
Not quite. Java does not use the MQSERVER environment variable.
You specify the channel directly. If you use JMS you may have to use a channel table to get a channel of suitable size.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 05, 2009 3:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
Not quite. Java does not use the MQSERVER environment variable.
You specify the channel directly. If you use JMS you may have to use a channel table to get a channel of suitable size.
|
Granted, but my point was there's no difference to the software. You may have to code differently to obtain the objects. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|