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 » MaxMessageLength in .Net

Post new topic  Reply to topic
 MaxMessageLength in .Net « View previous topic :: View next topic » 
Author Message
Marsden
PostPosted: Tue Mar 27, 2012 9:18 am    Post subject: MaxMessageLength in .Net Reply with quote

Newbie

Joined: 06 Feb 2012
Posts: 4

Hi, I've been trying to increase the maxmessagelength in my .Net application from the default 4MB to 10MB (10485760). I have increased the queues, channels and manager to this value and then copied the CHL file to my local machine and set the environment variables (MQCHLLIB & MQCHLTAB) to the file. Still when I output the message size in my program it is telling me it is 4MB (4194304). I must be missing something but can't seem to figure out what else I could try. Already tried setting it manually in the hashtable I pass to initialize the qManager. Any help would be appreciated.

here's a snippet from my code:
Code:

    Private Shared Function init(ByVal connectionType As [String]) As Hashtable
        Dim connectionProperties As New Hashtable()
        ' Add the connection type
        connectionProperties.Add(MQC.TRANSPORT_PROPERTY, connectionType)
        ' Set up the rest of the connection properties, based on the
        ' connection type requested
        Select Case connectionType
            Case MQC.TRANSPORT_MQSERIES_BINDINGS
                Exit Select
            Case MQC.TRANSPORT_MQSERIES_CLIENT, MQC.TRANSPORT_MQSERIES_XACLIENT, MQC.TRANSPORT_MQSERIES_MANAGED
                connectionProperties.Add(MQC.HOST_NAME_PROPERTY, My.Settings.hostname)
                connectionProperties.Add(MQC.CHANNEL_PROPERTY, My.Settings.channel)
                connectionProperties.Add(MQC.PORT_PROPERTY, My.Settings.port)
                connectionProperties.Add(MQC.MQIA_MAX_MSG_LENGTH, My.Settings.intMaxSize)
                Exit Select
        End Select
        Return connectionProperties
    End Function

connectionProperties = init(MQC.TRANSPORT_MQSERIES_CLIENT)
                QMgr = New MQQueueManager(My.Settings.Qmanager, connectionProperties)
                ' Set up the options on the queue we wish to open

                openOptions = MQC.MQOO_OUTPUT

                ' Now specify the queue that we wish to open,and the open options

                system_default_local_queue = QMgr.AccessQueue(My.Settings.outboundQ, openOptions)
                MsgBox(QMgr.MaximumMessageLength)
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Mar 27, 2012 9:24 am    Post subject: Re: MaxMessageLength in .Net Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Marsden wrote:
Hi, I've been trying to increase the maxmessagelength in my .Net application from the default 4MB to 10MB (10485760).


Understand first that .NET is not my strong suit.

Understanding that, have you:

confirmed via the explorer / runmqsc that the queue manager attribute in question shows 100Mb not 4Mb;

confirmed that the code has connected to the queue manager you think it has;

confirmed that the code chokes with the expected reason code if a message larger than 4Mb is placed on the queue.

I'll leave others to comment on my dim recollection that something .NET / XMS restricts messages to a max 4Mb. That could be an old version of the software or something I'm imagining.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Mar 27, 2012 9:30 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You did not tell your code to use the CHLTAB.

You told your code to manually build the connection, based on the default cltncon instance. Which is limited to 4mb.

To be more clear,
Code:

            Case MQC.TRANSPORT_MQSERIES_CLIENT, MQC.TRANSPORT_MQSERIES_XACLIENT, MQC.TRANSPORT_MQSERIES_MANAGED
                connectionProperties.Add(MQC.HOST_NAME_PROPERTY, My.Settings.hostname)
                connectionProperties.Add(MQC.CHANNEL_PROPERTY, My.Settings.channel)
                connectionProperties.Add(MQC.PORT_PROPERTY, My.Settings.port)
                connectionProperties.Add(MQC.MQIA_MAX_MSG_LENGTH, My.Settings.intMaxSize)
                Exit Select

is wrong.
Back to top
View user's profile Send private message
Marsden
PostPosted: Tue Mar 27, 2012 9:45 am    Post subject: Reply with quote

Newbie

Joined: 06 Feb 2012
Posts: 4

Hey mqjeff, I'm really new to MQ clients in .Net. Been dealing with the server side for most of my experience in MQ. How would I go about doing this in the code?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Mar 27, 2012 10:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You tell it what queue manager name to connect to, nothing else.
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Mar 28, 2012 12:09 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

And if it's WMQ V7.0 you're using you don't need the variables, you can use the mqclient.ini file.
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » MaxMessageLength in .Net
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.