Author |
Message
|
paustin_ours |
Posted: Wed Jun 22, 2016 4:00 pm Post subject: mqget node configure at runtime |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
i am trying to configure property values like getby correlationID at runtime.
I see i can set the queue name and GMO options in the Local environment, is there a way to set the other values specifically get by correlID and output location and result location at runtime? |
|
Back to top |
|
 |
paustin_ours |
Posted: Wed Jun 22, 2016 4:07 pm Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
found this MQMO_MATCH_CORREL_ID am going to try this but still cant find a way to dynamically pass the result location and output location. |
|
Back to top |
|
 |
paustin_ours |
Posted: Wed Jun 22, 2016 7:26 pm Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
I am using
Quote: |
SET OutputLocalEnvironment.MQ.GET.MQGMO.Options = MQGMO_BROWSE_NEXT+MQGMO_VERSION_2+MQMO_MATCH_CORREL_ID; |
this only gives me the first message in the queue each time. Any suggestions on what i might be doing wrong? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 23, 2016 1:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
paustin_ours wrote: |
Any suggestions on what i might be doing wrong? |
Something in your flow logic that's (accidentally) resetting the browse cursor?
Also be aware that looping round and round inside a flow to read messages with an MQGet node is the accepted best method of running the execution group out of memory and causing it to crash. You're be much better off (if it's at all possible) getting whoever's replying with these messages to send them as an MQ group and then just reading the group with an MQInput node. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
paustin_ours |
Posted: Thu Jun 23, 2016 2:21 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
Oh that's not what I am doing. I have around 1000 msgs on a queue. Each with its own unique corellID. I do a look up for specific corellID to retrieve the message whose contents are used for further processing.
These used to be a dB lookup now I have dumped data on queue.
I want to browse with corellID but this option always retrieves the first message.
Trying to find the right options to use |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 23, 2016 3:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
paustin_ours wrote: |
Trying to find the right options to use |
If the correID is specific, why BROWSE_NEXT not BROWSE_FIRST?
If you're doing a BROWSE_NEXT without a BROWSE_FIRST, you may not have a browse cursor set so it's defaulting to the first message on the queue. Probably shouldn't be doing that, but it might be doing that.
If you've got 1000 messages on a queue and you're looking them up by a specific correlID (key value), you'll probably find when you get this working that having 1000 rows in a database and doing a lookup on that is faster and more efficient. Browsing messages is resource expensive, looking for specific ids in a queue is expensive, doing both is n a s t y......
Why did you change from db lookup to queue browse? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
paustin_ours |
Posted: Thu Jun 23, 2016 4:19 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
That's a simple answer, we won't have dB connectivity for another 6 months or more. This is temporary. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 23, 2016 4:23 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
paustin_ours wrote: |
That's a simple answer, we won't have dB connectivity for another 6 months or more. This is temporary. |
Use some other kind of DB locally - anything that you can use JDBC or ODBC with.
It is much easier to deploy configuration changes than it is to deploy code changes. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
paustin_ours |
Posted: Thu Jun 23, 2016 4:47 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
Unfortunately we cant at this time.
i even tried
MQGMO_BROWSE_FIRST, i am missing something in the below option, just cant figure out what that would be
Code: |
SET OutputLocalEnvironment.MQ.GET.QueueName = 'DUMPQ';
SET OutputLocalEnvironment.MQ.GET.MQGMO.Options = MQGMO_VERSION_2+MQGMO_BROWSE_FIRST+MQMO_MATCH_CORREL_ID;
SET OutputRoot.MQMD.MsgId = MQMI_NONE;
SET OutputRoot.MQMD.CorrelId = CORRELID;
|
|
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 23, 2016 4:49 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You have to Browse First. Then you have to Browse Next.
You probably also don't need the MQGMO_VERSION. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
paustin_ours |
Posted: Thu Jun 23, 2016 5:01 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
If I don't put in the version, I get MQRC_OPTIONS_ERROR
then when i do both browse first and browse next like below
Code: |
MQGMO_VERSION_2+MQGMO_BROWSE_FIRST+MQGMO_BROWSE_NEXT+MQMO_MATCH_CORREL_ID
|
I get MQRC_OPTIONS_ERROR as well.
I believe you probably didn't mean it he way i tried it. should i put it in different esql statements? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 23, 2016 5:07 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
No.
You need to call MQGet node with Browse First.
Then you need to call it again with Browse Next. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
paustin_ours |
Posted: Thu Jun 23, 2016 5:59 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
and keep doing that until there is a match? this sounds like around about way. i will try |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 23, 2016 6:22 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The match correl id will return messages with that specific correlID.
If there's only one, then Browse First will return it.
If there's more than one, then Browse First will return the first one, and browse next will return each one until it tells you it's done.
Edit - what I mean is, each time you call the MQGet node with Browse Next, it will return the next message with the matching correl ID. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
paustin_ours |
Posted: Thu Jun 23, 2016 7:30 am Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
Quote: |
what I mean is, each time you call the MQGet node with Browse Next, it will return the next message with the matching correl ID. |
there is just only one message with a particular correlID of the 800+ messages sitting on the queue.
now when i do a browse next with match correl ID, it should give me the matching message correct?
why do i have to do browse first?
also i tried browse next with matching correl ID option and it still only gives me the first message even though that messages doesn't match the correlID |
|
Back to top |
|
 |
|