Author |
Message
|
shogan2003 |
Posted: Sun May 23, 2004 8:39 am Post subject: vbscript : putting large messages via MQClient takes hours |
|
|
Centurion
Joined: 03 Jul 2003 Posts: 133 Location: London
|
A similar query to a previous thread I initiated recently..that concerned Java and resolution was achieved through code changes.
Knowing even less about vbscript than I do about Java, am hoping that it's simply a code change required to turbocharge the following scenarios.
Environment :
vbscript running on MQSeries client machine : Win-2K.
Sorry cannot supply CPU or memory details at this time.
Scenario 1
------------
If I put a message of 4Mb on the queue, the put operation takes 10 min.
Scenario 2
------------
Size of message : > 4Mb
using env var MQSERVER and segmenting message in a bid to overcome the 4Mb max size issue when using MQSERVER to define the client connection.
Target queue MAXMSGL set to 4194304. I have created a file of 8Mb in size and I started the put operation around an hour ago.
Ultimately am aiming to push 100Mb messages across the client connection, using segmentation if I have to.
Here is a code extract :
===============================================
msgPut.applicationIdData = my_applicationIdData
msgPut.PutDateTime = Now
' Following is TOO SLOW
' msgPut.WriteString(msg_str)
' but is this any faster ?'
msgPut.MessageData = msg_str
set pmo = MQSess.AccessPutMessageOptions()
pmo.Options = 2048 '0x800 : MQPMO_SET_ALL_CONTEXT
MQSess_Q.put msgPut, pmo
=============================================== _________________ MQSI2 certified specialist
MQSeries certified specialist |
|
Back to top |
|
 |
leongor |
Posted: Mon May 24, 2004 1:12 am Post subject: |
|
|
 Master
Joined: 13 May 2002 Posts: 264 Location: Israel
|
Quote: |
msgPut.applicationIdData = my_applicationIdData
msgPut.PutDateTime = Now
' Following is TOO SLOW
' msgPut.WriteString(msg_str)
' but is this any faster ?'
msgPut.MessageData = msg_str
set pmo = MQSess.AccessPutMessageOptions()
pmo.Options = 2048 '0x800 : MQPMO_SET_ALL_CONTEXT
MQSess_Q.put msgPut, pmo
|
You are using MQAX API not VB. I remember that there was some bug ( or feature ) in MQAX that it performs conversion even in MQPUT action.
Try to send binary data, not string.
Also I think IBM always recommend using VB MQI, not MQAX. _________________ Regards.
Leonid.
IBM Certified MQSeries Specialist. |
|
Back to top |
|
 |
JasonE |
Posted: Mon May 24, 2004 1:29 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
SetMessageData calls WriteString under the covers
WriteString converts from Unicode to the MQMessage CharacterSet value, so you can 'avoid' this (assuming you dont want it) by
MQMessage.CharacterSet = 1200
msgPut.WriteString(msg_str)
As per the above update though, treating the data as binary is probably more appropriate if you dont want conversion (msgPut::write) |
|
Back to top |
|
 |
shogan2003 |
Posted: Mon May 24, 2004 6:28 am Post subject: |
|
|
Centurion
Joined: 03 Jul 2003 Posts: 133 Location: London
|
Thanks gents for the replies received so far and for making me aware of the fact that VB API MQ calls may be embedded in vbs.
I'd be grateful for a specific example of a VB put of binary data embedded in the vbscript, togethr with the associated VB initialisation calls for the queue manager and queue.
Not that I wish to be spoon-fed, you understand
I do have a collection of VB sample files copied from the Web but any help of this nature you could provide would expedite matters nicely.
Shalom/Salaam/Have a nice day _________________ MQSI2 certified specialist
MQSeries certified specialist |
|
Back to top |
|
 |
shogan2003 |
Posted: Tue May 25, 2004 1:03 am Post subject: |
|
|
Centurion
Joined: 03 Jul 2003 Posts: 133 Location: London
|
I think it's this command that's killing performance :
msg_txt = file.ReadAll
So is it possible to transfer binary data in vbscript ?
Any examples ? _________________ MQSI2 certified specialist
MQSeries certified specialist |
|
Back to top |
|
 |
|