Discussion:
How to send messages of size more than 10MB using MQ JMS Java Client ?
(too old to reply)
a***@gmail.com
2006-10-10 10:07:18 UTC
Permalink
I am using MQ Java Client to connect to MQ 5.3 Server.

I set max message length for all objects Queue Manager, Queue, Server Channel and client connection to 10485760 on server.

I am using MQ JMS API to connect to MQ Server.

My question is , Is there a way where I can specify max message length parameter in my application which enables me to send messages of size 10MB ?

All messages below default size 4MB are sent without problems.

Thanks in adavance ,
Akshay.
Martin
2006-10-10 20:18:18 UTC
Permalink
What error messages do you see when trying to send > 4 Mb ?

Martin
Post by a***@gmail.com
I am using MQ Java Client to connect to MQ 5.3 Server.
I set max message length for all objects Queue Manager, Queue, Server
Channel and client connection to 10485760 on server.
I am using MQ JMS API to connect to MQ Server.
My question is , Is there a way where I can specify max message length
parameter in my application which enables me to send messages of size 10MB
?
All messages below default size 4MB are sent without problems.
Thanks in adavance ,
Akshay.
a***@gmail.com
2006-10-11 16:30:51 UTC
Permalink
Thanks much for your reply...

I am getting following linked exception ;

<MSG_TEXT>MQBridge_initJmsEndpoints: [Linked-MQSeries-exception]
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2031
at com.ibm.mq.MQQueue.putMsg2(MQQueue.java:1562)
at com.ibm.mq.jms.MQMessageProducer.sendInternal(MQMessageProducer.java:1582)
at com.ibm.mq.jms.MQMessageProducer.send(MQMessageProducer.java:1022)
at com.ibm.mq.jms.MQMessageProducer.send(MQMessageProducer.java:1056)


In my application we have encapsulated all exception .. I got above stack for MQ JMS ..
Martin
2006-10-12 08:59:05 UTC
Permalink
Reason code 2031 is MQRC_MSG_TOO_BIG_FOR_Q_MGR. This is covered in the MQ
manuals. I hope this helps

Martin
Post by a***@gmail.com
Thanks much for your reply...
I am getting following linked exception ;
<MSG_TEXT>MQBridge_initJmsEndpoints: [Linked-MQSeries-exception]
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2031
at com.ibm.mq.MQQueue.putMsg2(MQQueue.java:1562)
at
com.ibm.mq.jms.MQMessageProducer.sendInternal(MQMessageProducer.java:1582)
at com.ibm.mq.jms.MQMessageProducer.send(MQMessageProducer.java:1022)
at com.ibm.mq.jms.MQMessageProducer.send(MQMessageProducer.java:1056)
In my application we have encapsulated all exception .. I got above stack for MQ JMS ..
a***@gmail.com
2006-10-12 14:49:57 UTC
Permalink
Martin,

Thanks a lot for your reply. It certainly helped.
But Most of IBM manuals mention handling messages more thans 10MB for local (bind) connection. Most of these manuals only suggest to set MaxMsgLength to more than 4MB for Q Manager, Q and Channel but I have followed these steps already with no success.

Unfortunately handling of such messages is not discussed for remote(client) connections.

These manuals also mention that we need to provide 'channel definition table' location on client side to send larger messages but I am not sure whether it is correct or not.

Thank you,
Akshay.
Martin
2006-10-12 14:54:52 UTC
Permalink
Post by a***@gmail.com
These manuals also mention that we need to provide
'channel definition table' location on client side to send
larger messages but I am not sure whether it is correct
or not.
Please could you give a reference or URL to the part of the manual where you
saw this. If it said you need a client channel definition table, then I
expect this is true and correct.
Post by a***@gmail.com
Thank you,
Akshay.
Martin
Phil Willoughby
2006-10-12 21:26:24 UTC
Permalink
Post by Martin
Post by a***@gmail.com
These manuals also mention that we need to provide
'channel definition table' location on client side to send
larger messages but I am not sure whether it is correct
or not.
Please could you give a reference or URL to the part of the manual where you
saw this. If it said you need a client channel definition table, then I
expect this is true and correct.
It does and it is. You need a CCDT for a client connection if the
maximum message length on the channel is not 4MiB.

The Using Java manual specifies the ConnectionFactory properties you
need to set to use client channel definition tables from JMS.

Regards,

Phil Willoughby
--
Software Engineer (Development)
IBM Message Service Clients for C/C++
a***@gmail.com
2006-10-13 15:49:49 UTC
Permalink
Thank you very much for all your help.

I am refering;

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/csqzaw1462.htm

=> Using Java => Programming With Websphere MQ JMS => Writing Websphere MQ JMS 1.1 Applications.

As mentioned, I have already changed max message length for both 'client channel' and 'server channel' on MQ server.

Still I need set CCDT on client side ?

If yes then can I directly copy (ftp) it from MQ Server ?
and use it like this ? or is there a seperate way to generate CCDT on client ?
---
java.net.URL chanTab1 = new URL("file:///home/admdata/ccdt1.tab");
factory.setCCDTURL(chanTab1);
---

Thanks again,
Akshay.
Phil Willoughby
2006-10-16 10:24:24 UTC
Permalink
Post by a***@gmail.com
Still I need set CCDT on client side ?
Yes
Post by a***@gmail.com
If yes then can I directly copy (ftp) it from MQ Server ?
Yes. If you have multiple clients which all have access to a shared
volume you can store the CCDT there, as the client only needs read
access. That helps ensure that all your client machines have the same CCDT.

Regards,

Phil Willoughby
--
Software Engineer (Development)
IBM Message Service Clients for C/C++
j***@zystems.se
2006-11-03 09:45:57 UTC
Permalink
The 4MB restriction doesn't apply to Java clients, just for MQI clients. Just make sure to increase the MAXMSGL property for the queue, channel and queue manager to the desired value (max 100MB). I have sent a close to 100MB message as a Java client in MQ6 without a CCDT. Should work for MQ 5.3.X as well.
Loading...