ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » MQRC_DATA_LENGTH_ERROR

Post new topic  Reply to topic Goto page Previous  1, 2
 MQRC_DATA_LENGTH_ERROR « View previous topic :: View next topic » 
Author Message
adritownsend
PostPosted: Mon May 16, 2011 12:35 am    Post subject: Reply with quote

Novice

Joined: 13 May 2011
Posts: 10

I have found this on another thread:

"When the MQSERVER environment variable is used to define a client channel a maximum message length (MAXMSGL) of 4 MB is used, so larger messages cannot flow across this channel. For larger messages a client-connection channel must be defined using DEFINE CHANNEL, on the server, with MAXMSGL set to a larger figure, or using an MQCONNX call with MaxMsgLength set in the MQCD referred to in the MQCNO structure."

Can anyone tell me how this DEFINE CHANNEL is used (google is my friend in the meantime...as you can see I'm still a newbie)
Back to top
View user's profile Send private message
exerk
PostPosted: Mon May 16, 2011 12:48 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

The 4MB limit to the MQSERVER variable was removed in WMQ V7.0 and is now 100MB. The default MAXMSGL for the channel you are trying to use may be the default 4MB however, and you should define a new SVRCONN channel with an appropriately larger MAXMSGL. How to do so is in the Info Centre - hint: search search on 'Define Channel'.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
adritownsend
PostPosted: Mon May 16, 2011 1:12 am    Post subject: Reply with quote

Novice

Joined: 13 May 2011
Posts: 10

Usefull info thanks. And for the great hint, thanks, don't know what I would have done without you!
Back to top
View user's profile Send private message
adritownsend
PostPosted: Thu May 19, 2011 10:42 pm    Post subject: Reply with quote

Novice

Joined: 13 May 2011
Posts: 10

Along with all the advice of creating my own svrconn and clientconn this piece of code solved my problem:

import pymqi
import CMQC, CMQXC

queue_manager = "QM01"
channel = "SVRCONN.1"
host = "192.168.1.139"
port = "1434"
queue_name = "TEST.1"
message = "Hello from Python!" * 10000
conn_info = "%s(%s)" % (host, port)

cd = pymqi.CD()

cd.MaxMsgLength = 9595093

cd.ChannelName = channel
cd.ConnectionName = conn_info
cd.ChannelType = CMQC.MQCHT_CLNTCONN
cd.TransportType = CMQC.MQXPT_TCP

qmgr = pymqi.QueueManager(None)
qmgr.connect_with_options(queue_manager, cd=cd)

queue = pymqi.Queue(qmgr, queue_name)
queue.put(message)
queue.close()

qmgr.disconnect()
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » General IBM MQ Support » MQRC_DATA_LENGTH_ERROR
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.