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 » IBM MQ API Support » XMS - how to set max message size

Post new topic  Reply to topic
 XMS - how to set max message size « View previous topic :: View next topic » 
Author Message
antishok
PostPosted: Mon Jun 30, 2008 8:42 am    Post subject: XMS - how to set max message size Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

Hello,

I'm using the XMS API for C++ for making an MQ client app.
When I try to put messages on a queue, which are bigger than 4MB,
I get a 2010 error (MQRC_DATA_LENGTH_ERROR).

The maxmessage size for the queue, server connection channel, and queue manager are all big enough.

My question is - is there a maxMessageSize which is negotiated for the specific connection?
I know that when I used the client connections table file previously when using AMI, I could specifiy this for the client channel.

But now with XMS I am creating the connection and factory dynamically in the code, and I do not see anyplace to set this.

Any ideas would be welcome.

Thank you,

Uri Gilad
YCD
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 30, 2008 11:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Try using a client table. Outside of a managed connection you are using the underlying c implementation and you will need to use a client table for > 4MB messages
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
antishok
PostPosted: Wed Jul 02, 2008 3:14 am    Post subject: Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

Thanks for your reply

1. How would I use a client table with XMS?
2. That defeats the purpose of a dynamic connection where I can specify the hostname/queuemanger/etc at runtime.. doesn't it? How could I get the same functionality?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 02, 2008 12:54 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

antishok wrote:
Thanks for your reply

1. How would I use a client table with XMS?
2. That defeats the purpose of a dynamic connection where I can specify the hostname/queuemanger/etc at runtime.. doesn't it? How could I get the same functionality?


No I believe it will even make it more flexible...
Read up on the client manual and the programmer's manual
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
antishok
PostPosted: Thu Jul 03, 2008 8:14 am    Post subject: Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

I can't find anything in the docs about using a client table when using the high-level XMS API to program MQ. You are referring to the client channel definition table, right?

Anyway, I still don't see how using it would help me, it is a static file which I cannot really change in runtime (well, I can, and I have in the past, when using AMI which didn't let me dynamically configure the connection in runtime, but that's an ugly hack), but only from the MQ Server

I have found this:
"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."

so it still seems to me that I'd need to prepare the client table beforehand, or use the low-level API so I can alter the MQCNO structure contents.

Am I getting it all wrong?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jul 03, 2008 10:37 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I think you're getting it right!
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
antishok
PostPosted: Thu Jul 03, 2008 10:43 am    Post subject: Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

fjb_saper wrote:
I think you're getting it right!


Not sure what tone you're implying with that

If what I said is right, then I need to prepare the client table beforehand, and so I don't see why you said that it would be more flexible with a client table..

How can I specify hostname/QM/etc for the connection at runtime using it?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jul 03, 2008 10:50 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

antishok wrote:
fjb_saper wrote:
I think you're getting it right!


Not sure what tone you're implying with that

If what I said is right, then I need to prepare the client table beforehand, and so I don't see why you said that it would be more flexible with a client table..

How can I specify hostname/QM/etc for the connection at runtime using it?

It is more flexible because if you have multiple qmgrs in your environment you can define your channel table in such a way that your app will connect to the first one that is available... Read the client manual
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
antishok
PostPosted: Thu Jul 03, 2008 10:54 am    Post subject: Reply with quote

Apprentice

Joined: 29 Apr 2007
Posts: 31

fjb_saper wrote:
It is more flexible because if you have multiple qmgrs in your environment you can define your channel table in such a way that your app will connect to the first one that is available... Read the client manual


I understand that,
but in my case I have many queue managers and I may add more of them at any time, and so the TAB file would have to be modified.

I'd like the client to be able to connect to the new ones as well without having to copy a new TAB file to it..

(The client connects to a central server, from which it retrieves the hostname of another server it should connect to)
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 » IBM MQ API Support » XMS - how to set max message size
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.