| Author | Message | 
		
		  | shogan2003 | 
			  
				|  Posted: Fri Nov 03, 2006 3:40 am    Post subject: Error 2010 C# MQClient messages greater than 4Mb |   |  | 
		
		  | Centurion
 
 
 Joined: 03 Jul 2003Posts: 133
 Location: London
 
 | 
			  
				| Hello 
 A friend of mine has written a C# application; the connection parameters are defined in an XML file
 
 For messages > 4Mb  (4.5Mb) he receives the error code 2010
 
 Environment variable MQSERVER isn't being used and MQCHLTAB, MQCHLLIB + channel connection table file don't make any difference.
 The log file size is 16Mb
 
 He found that  he can work around the problem as an interim measure if he comments out the C# methods for begin transaction and end transaction, as shown below :
 
 Mqconnection.BeginTrans();   // *****************comment this line
 try
 {
 // Put the file onto MQ
 mqconnection.PutMessage(mi);
 // Move/Delete the inbound file
 if (sArchivePath == "")
 {
 fi.Delete();
 }
 else
 {
 fi.MoveTo(Path.GetFullPath(sArchivePath)+"\\"+fi.Name);
 }
 //	mqconnection.CommitTrans(); //***comment this line
 
 
 The begin Transaction method :
 
 public void BeginTrans()
 {
 bInTransaction = true;
 queueManager.Begin();
 }
 
 public void CommitTrans()
 {
 bInTransaction = false;
 queueManager.Commit();
 }
 
 public void Rollback()
 {
 bInTransaction = false;
 queueManager.Backout();
 }
 
 public void PutMessage(string sMessage)
 {
 MQMessageInformation mi = new MQMessageInformation(MQHeaderFormat.None);
 mi.MessageText = sMessage;
 PutMessage(mi);
 }
 _________________
 MQSI2 certified specialist
 MQSeries certified specialist
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | zpat | 
			  
				|  Posted: Fri Nov 03, 2006 3:49 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 19 May 2001Posts: 5867
 Location: UK
 
 | 
			  
				| Increase the client channel max message length. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Fri Nov 03, 2006 3:22 pm    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| zpat wrote: |  
	| Increase the client channel max message length. |  
 This should fix problem # 1
 
 The next problem could be with transaction...
 My guess is the log files are not defined to allow a transaction of that size... either.
 
 See the primary and secondary logfiles and the file size (in increments of 4kB...)
 
 Enjoy
  _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | shogan2003 | 
			  
				|  Posted: Sat Nov 04, 2006 11:45 am    Post subject: |   |  | 
		
		  | Centurion
 
 
 Joined: 03 Jul 2003Posts: 133
 Location: London
 
 | 
			  
				| We have the checked the channel size to be of 10 MB and the log size were of 16 Mbs. 
 We checked the size of the log file by looking into the logs of the particular queue manager.
 
 However i am unaware of how to change the primary and secondary log file size.
 _________________
 MQSI2 certified specialist
 MQSeries certified specialist
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kayou | 
			  
				|  Posted: Tue Dec 12, 2006 3:20 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 05 Aug 2006Posts: 21
 
 
 | 
			  
				| Try RUNMQSC. 
 It is a MQ command interpreter which is installed on the WMQ server's machine. If you do "DISPLAY GMGR" you'll see all queue manager attributes and their values. You could change them by doing "ALTER GMGR <attribute-name> (<attribute-value>). If you do not the signification of an attribute (example : CCSID), google it ; with a couple of links you'll find it out.
 
 You can do the same mapnipulation for any MQ object you want to modify (queue, channel, ...). You can also runmqsc with an input file containing all your commands.
 
 Have fun.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Tue Dec 12, 2006 3:35 pm    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| shogan2003 wrote: |  
	| We have the checked the channel size to be of 10 MB and the log size were of 16 Mbs. 
 We checked the size of the log file by looking into the logs of the particular queue manager.
 
 However i am unaware of how to change the primary and secondary log file size.
 |  On Unix see /var/mqm/qmgrs/<qmgr>/qm.ini... You can change the number of primary and secondary log files... You cannot change the size of the logfiles without recreating the qmgr...
  _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | wschutz | 
			  
				|  Posted: Tue Dec 12, 2006 3:50 pm    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 02 Jun 2005Posts: 3316
 Location: IBM (retired)
 
 | 
			  
				| You are using MQBEGIN (begin()) in a client environment?  That doesn't work... begin isn't available in a mq client environment..... _________________
 -wayne
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kayou | 
			  
				|  Posted: Tue Dec 12, 2006 5:08 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 05 Aug 2006Posts: 21
 
 
 | 
			  
				| 10 MB ? Think about the storage and time it takes to be processed by MQ. In a system with a little bit real-time constrains, you'd be better to put the message in a file in an FTP server, send a link to the appliaction and tell him to get the message outside of the MQ bandwith. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | jefflowrey | 
			  
				|  Posted: Tue Dec 12, 2006 5:13 pm    Post subject: |   |  | 
		
		  | Grand Poobah
 
 
 Joined: 16 Oct 2002Posts: 19981
 
 
 | 
			  
				| 
   
	| kayou wrote: |  
	| 10 MB ? Think about the storage and time it takes to be processed by MQ. In a system with a little bit real-time constrains, you'd be better to put the message in a file in an FTP server, send a link to the appliaction and tell him to get the message outside of the MQ bandwith. |  
 That's silly.
 _________________
 I am *not* the model of the modern major general.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kayou | 
			  
				|  Posted: Tue Dec 12, 2006 5:38 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 05 Aug 2006Posts: 21
 
 
 | 
			  
				| Jefflowrey, 
 My english is very limited. Could you tell me what you mean by the word "silly" ?
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | jefflowrey | 
			  
				|  Posted: Tue Dec 12, 2006 5:49 pm    Post subject: |   |  | 
		
		  | Grand Poobah
 
 
 Joined: 16 Oct 2002Posts: 19981
 
 
 | 
			  
				| MQ is perfectly capable of handling 10mb messages. 
 It will have some performance impact, but it can be managed easily.
 
 MQ is a significantly better transport for all kinds of enterprise data movement than FTP.
 
 It is better to use MQ than to use FTP.
 
 
 On the other hand, it is better to make your MQ messages as small as possible.
 _________________
 I am *not* the model of the modern major general.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kayou | 
			  
				|  Posted: Tue Dec 12, 2006 6:48 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 05 Aug 2006Posts: 21
 
 
 | 
			  
				| 
   
	| jefflowrey wrote: |  
	| MQ is perfectly capable of handling 10mb messages. |  
 I new that.
 
 
 
   
	| jefflowrey wrote: |  
	| It will have some performance impact, but it can be managed easily. |  
 Sure ! The performance impact is the reason why I sent a reply.
 
 
 
   
	| jefflowrey wrote: |  
	| MQ is a significantly better transport for all kinds of enterprise data movement than FTP. It is better to use MQ than to use FTP. 
 |  
 I 100% disagree with that.
 
 MQ is the de facto standard of MOMs (Message Oriented Middleware) very suitable for making autonomous applications to communicate (and NOT TO SHARE DATA) ; in a real time or mission critical business, it is very recommended to have very short messages. A MOM is not a File TILE TRANSFER PROTOCOL. A MOM is not a DATABASE.
 
 
 
   
	| jefflowrey wrote: |  
	| On the other hand, it is better to make your MQ messages as small as possible. |  
 If you can not make them small ???
 
 Intelligent answer : You may use good old tools like the old and helpful FTP. Instead of sending the data in the message, you send a pointer (link) in data. The application could get the content of the message (by FTP) without using MQ processing resources.
 
 Example : Your MQ messages content is structured XML. In your XML, you can have the tag or attribute "FTP" for large size messages, instead of the content of the message.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | wschutz | 
			  
				|  Posted: Tue Dec 12, 2006 7:02 pm    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 02 Jun 2005Posts: 3316
 Location: IBM (retired)
 
 | 
			  
				| Interesting debate, but nothing to do with the original post. _________________
 -wayne
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Wed Dec 13, 2006 4:35 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| And to come back to the original post: 
 To go over 4MB he needs a client definition for the channel ... i.e. use of the channel Tables ...
 
 Don't remember if the newest .NET version gives him support for that...
 
 
  _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Wed Dec 13, 2006 4:58 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |