|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
I am a newbie, please help .. thanks |
« View previous topic :: View next topic » |
Author |
Message
|
matthewho007 |
Posted: Tue Jan 04, 2005 12:28 am Post subject: I am a newbie, please help .. thanks |
|
|
Newbie
Joined: 04 Jan 2005 Posts: 1
|
2 queues used. One queue is a request queue while another is response queue.
THe server process get the request from the request queue and put back the response into the response queue.
I need to write a client part to send a request into the request queue and get back the response from the response queue. However, I can send the request and the server process put back the response into the response queue (the server process put back the message ID which extracted from the request messge into the response message). However, my program can't get back the correct one. Please help. Thanks......
The code is as below:
Const MQGMO_SYNCPOINT = &H2
Const MQPMO_SYNCPOINT = &H2
Const MQPMO_NEW_CORREL_ID = &H80
Const MQGMO_NONE = &H0
Const MQMO_MATCH_MSG_ID = &H1
Const MQMO_MATCH_CORREL_ID = &H2
Const MQMO_MATCH_GROUP_ID = &H4
Const MQMO_MATCH_MSG_SEQ_NUMBER = &H8
Const MQMO_MATCH_OFFSET = &H10
Const MQMO_MATCH_MSG_TOKEN = &H20
Const MQMO_NONE = &H0
Const MQOO_OUTPUT = &H10
Const MQOO_INQUIRE = &H20
Const MQOO_INPUT_AS_Q_DEF = &H1
Dim MQSess, QMgr, getQueue, putQueue, putMsg, pmo, gmo, gmsg, gs
MQSess = CreateObject("MQAX200.MQSession")
QMgr = MQSess.AccessQueueManager("QM_icbc125")
putQueue = QMgr.AccessQueue("Matthew_Queue1", MQOO_INQUIRE Or MQOO_OUTPUT) '16=MQOO_OUPTUT
putMsg = MQSess.AccessMessage()
putMsg.Format = "MQSTR "
putMsg.ReplyToQueueName = "Matthew_Queue2"
putMsg.ReplyToQueueManagerName = "QM_icbc125"
putMsg.WriteString("Hello ASP world 111222!")
pmo = MQSess.accessPutMessageOptions()
'pmo.MatchOptions = MQMO_MATCH_MSG_ID
'pmo.Options = MQPMO_SYNCPOINT
putQueue.put(putMsg, pmo)
'putQueue.MatchOptions = MQMO_MATCH_MSG_ID + MQMO_MATCH_CORREL_ID
getQueue = QMgr.AccessQueue(putMsg.ReplyToQueueName, MQOO_INQUIRE Or MQOO_INPUT_AS_Q_DEF, _
putMsg.ReplyToQueueManagerName)
gmo = MQSess.AccessGetMessageOptions()
gmo.WaitInterval = 1000
gmsg = MQSess.AccessMessage()
gmsg.MessageId = putMsg.CorrelationId
getQueue.Get(gmsg, gmo)
Dim len
len = gmsg.MessageLength
Response.Write(gmsg.readstring(len)) |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Jan 04, 2005 6:07 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|