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 Discussion » Large message segmentation with .NET

Post new topic  Reply to topic
 Large message segmentation with .NET « View previous topic :: View next topic » 
Author Message
smarriott
PostPosted: Tue Dec 02, 2008 1:24 am    Post subject: Large message segmentation with .NET Reply with quote

Newbie

Joined: 01 Dec 2008
Posts: 3

Hi

I need to segment 'large' messages using the MQ v6.0 .NET libraries. The messages are around 6MB in size, and the exception I receive when putting a message is: 2010 - MQRC_DATA_LENGTH_ERROR.

I have implemented segmentation as per the documentation [I cannot post a link to it as this is my first post!] but I suspect I am still subject to the limited queue size.

The code I am using is:

Code:

        Dim MQManager As New IBM.WMQ.MQQueueManager(MQManagerName, MQPropertyStack)
        Dim MQQueue As IBM.WMQ.MQQueue = MQManager.AccessQueue(MQOutboundQueueName, IBM.WMQ.MQC.MQOO_OUTPUT)
        Dim mqm As New MQMessage

        mqm.CharacterSet = IBM.WMQ.MQC.CODESET_UTF
        mqm.WriteString("This is a 6MB XML string")

        'allow segmentation
        mqm.MessageFlags = MQMF_SEGMENTATION_ALLOWED

        'put
        MQQueue.Put(mqm)



I suspect I will need to perform some kind of application segmentation as per the documentation but I cannot seem to implement.

Can anyone advise if my approach is wrong, or offer any examples of how to segment put messages.

Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 02, 2008 1:57 am    Post subject: Re: Large message segmentation with .NET Reply with quote

Grand High Poobah

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

smarriott wrote:
I suspect I am still subject to the limited queue size.


Why is the queue size limited? 6Mb is well within the max message size of WMQv6.

What is the design requirement that has pushed you to segmentation?

(I accept this is not answering the question you're asking - just trying to understand your situation!)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
zpat
PostPosted: Tue Dec 02, 2008 2:07 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

The default max message length on channels tends to be 4 MB. This needs to be increased.

Quote:
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.


Last edited by zpat on Tue Dec 02, 2008 3:00 am; edited 1 time in total
Back to top
View user's profile Send private message
smarriott
PostPosted: Tue Dec 02, 2008 2:53 am    Post subject: Reply with quote

Newbie

Joined: 01 Dec 2008
Posts: 3

Hi

I understand there is a 4MB limit on the queue and channels.

The remote MQ server is not under my control and have been told the queue and channel sizes will not be changed, hence the need for segmentation.

The message sizes could get quite large, possibly upto 20MB in some rare cases. They are just XML messages, so I did suggest zipping the XML before sending but was informed procesing zip files was 'not a good approach to have', is there any reason for this?

Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 02, 2008 3:26 am    Post subject: Reply with quote

Grand High Poobah

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

smarriott wrote:
I understand there is a 4MB limit on the queue and channels.


The limit is 100Mb. It's the default that's 4Mb.

smarriott wrote:
The remote MQ server is not under my control and have been told the queue and channel sizes will not be changed


Is this an informed technical decision or management attempting to preserve the status quo in case a change makes the magic go away? In your position I'd push back to the WMQ admin and ask for his reasoning on this.

In extremis he could define a new set of larger channels for you to use.

smarriott wrote:
I did suggest zipping the XML before sending but was informed procesing zip files was 'not a good approach to have', is there any reason for this?


It's an uncessary step but it would probably work. There are a number of commercial solutions for moving zip files over WMQ that might be useful in this circumstance.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smarriott
PostPosted: Tue Dec 02, 2008 6:20 am    Post subject: Reply with quote

Newbie

Joined: 01 Dec 2008
Posts: 3

Thanks for your advice on this one.

'They' have removed the 4MB channel limit [not sure to what level] and the messages are now going through.

I would still like to work out how to get message segmentation working.
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 Discussion » Large message segmentation with .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.