Author |
Message
|
jefflowrey |
Posted: Mon Oct 16, 2006 6:24 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
IanB |
Posted: Mon Oct 16, 2006 6:47 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
1) Cool, I've got the lengths for everything except MQ_LOG_EXTENT_NAME_LENGTH which isn't listed anywhere. All the others are predefined in some bas files fortunately. I'll try memcopying it to an array of chars and see if there's a nice string shaped hole I can measure.
2) That makes sense. It just so happens the example I was looking at returns lots of channels in one shot.
ie
buflen = MQCFH_STRUC_LENGTH + _
MQCFSL_STRUC_LENGTH_FIXED + MQ_CHANNEL_NAME_LENGTH * MAX_NUM_CHANNELS
|
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 16, 2006 6:51 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
IanB |
Posted: Mon Oct 16, 2006 6:58 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Oo where did you find that? Brilliant thanks! |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 16, 2006 7:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Um.
That's the link I posted as 1) above. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 16, 2006 7:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
IanB wrote: |
Oo where did you find that? Brilliant thanks!
|
Click it and you'll see......  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
IanB |
Posted: Mon Oct 16, 2006 7:12 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Vitor wrote: |
IanB wrote: |
Oo where did you find that? Brilliant thanks!
|
Click it and you'll see......  |
I think MQ has hurt my brain, I'm clearly unable to operate anymore  |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 16, 2006 7:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Soggy Brain Syndrome - there's a lot of it about at the moment. I've had a couple of recent attacks
MQ Is Good For You  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
IanB |
Posted: Mon Oct 16, 2006 7:53 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Vitor wrote: |
Soggy Brain Syndrome - there's a lot of it about at the moment. I've had a couple of recent attacks
MQ Is Good For You  |
Yep, SBS in combination with a Monday and a weekend at work. I see beer in my immediate future I think
I've made a bit of progress. I'll post the complete source if I get it working. I noticed the version I posted doesn't have the lines of code which actually open the queues :/ |
|
Back to top |
|
 |
IanB |
Posted: Tue Oct 17, 2006 1:41 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Good morning.
Things are looking better. The request is going out, and I'm getting results, but:
When I filter to * it seems I have to :
Connect
Get one message
Disconnect
repeat until Queue is empty. Is that accurate? Why do I need to go through the disconnect reconnect overhead?
Second I'm requesting all attributes which by my reckoning should be >400 bytes of return data, but I'm getting 168 bytes :/ I'm using mqget for the moment so I get a handy string representation, but I'm not sure how I'm going to may it into a struct as the process doesn't seem so clear cut.
Here's my response type
Private Type PCFInquireQueueStatusResp
Header As MQCFH
CurrentDepth As MQCFIN
LastGetDate As MQCFST
LastGetDate_string As String * MQ_DATE_LENGTH
LastGetTime As MQCFST
LastGetTime_String As String * MQ_TIME_LENGTH
LastPutDate As MQCFST
LastPutDate_string As String * MQ_DATE_LENGTH
LastPutTime As MQCFST
LastPutTime_String As String * MQ_TIME_LENGTH
MediaRecoveryLogExtent As MQCFST
MediaRecoveryLogExtent_string As String * MQ_LOG_EXTENT_NAME_LENGTH
OldestMsgAge As MQCFIN
OnQTime As MQCFIL
OpenInputCount As MQCFIN
OpenOutputCount As MQCFIN
QName As MQCFST
QName_string As String * MQ_Q_NAME_LENGTH
QSGDisposition As MQCFIN
QueueMonitoring As MQCFIN
StatusType As MQCFST
UncommittedMsgs As MQCFIN
End Type
Cheers
Ian |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 17, 2006 1:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
IanB wrote: |
Connect
Get one message
Disconnect
repeat until Queue is empty. Is that accurate? Why do I need to go through the disconnect reconnect overhead?
|
I don't know - why do you need to go through the disconnect? What goes wrong when you don't (I'm assuming you've tried it & it's failed or you wouldn't have bothered asking the question ). Do you get an error, does the 2nd get come up empty, what? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
IanB |
Posted: Tue Oct 17, 2006 2:32 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Vitor wrote: |
IanB wrote: |
Connect
Get one message
Disconnect
repeat until Queue is empty. Is that accurate? Why do I need to go through the disconnect reconnect overhead?
|
I don't know - why do you need to go through the disconnect? What goes wrong when you don't (I'm assuming you've tried it & it's failed or you wouldn't have bothered asking the question ). Do you get an error, does the 2nd get come up empty, what? |
Indeed,
MQGET gHcon, gReplyHobj, md, gmo, buflen, astring, datalen, CompCode, Reason
returns compcode 2 Reason 2033 which is MQRC_NO_MSG_AVAILABLE
However if I let it disconnect, reconnect (but don't send another request) it then pulls the next one off the queue. I was a bit suprised at first as I'd put about 4 quadrillion messages on there during the course of my testing  |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 17, 2006 2:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Odd - I'd be inclined to extend the wait interval on the get. Sounds like something in the darkness is taking a while to commit the messages!
You certainly shouldn't need to disconnect.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
IanB |
Posted: Tue Oct 17, 2006 2:53 am Post subject: |
|
|
Apprentice
Joined: 13 Oct 2006 Posts: 43
|
Vitor wrote: |
Odd - I'd be inclined to extend the wait interval on the get. Sounds like something in the darkness is taking a while to commit the messages!
You certainly shouldn't need to disconnect.  |
Fixed it, it turns out I need to clear down the message options structure.
If I can just figure out how to parse the results I'll be sitting pretty  |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 17, 2006 3:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Well yes, if you tell it to go and get the same message it's just read off the queue this will cause a 2033.
Bit of a schoolboy error there if you'll forgive the observation....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|