ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Triggering 'EVERY' - or is it? SOLVED (sort of)

Post new topic  Reply to topic
 Triggering 'EVERY' - or is it? SOLVED (sort of) « View previous topic :: View next topic » 
Author Message
exerk
PostPosted: Mon Oct 06, 2014 2:26 am    Post subject: Triggering 'EVERY' - or is it? SOLVED (sort of) Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

OK, I'm throwing this one out to the floor as a head-check, i.e. whether I'm seeing what I'm seeing, or misinterpreting what I'm seeing, or there is a bug and I need to open a PMR...

-----------------------------------------------------------

BACKGROUND
V7.5.0.2/4 (see later) on Linux (RHEL5): A roll-your-own 'monitoring' solution is using the MA01 SupportPac to put 'event' messages which are centralised to a triggered queue, which is set to FIRST with the queue manager's TRIGINT set to all the nines (999,999,999). The trigger fires a shell script which calls a Perl script, which again uses the SupportPac to read off the messages, which are dumped to a flat file, but this has also been tested by calling the Perl script directly.

So far testing has been carried out with a low volume of messages (sub-100).

FUNCTION
The 'monitoring' application, on first starting up, does the following:

1. Inquires on the queue depth;
2. Gets the MQMD detail of each message and logs it to a temp file;
3. Browses the messages and writes the content to flat file;
4. Deletes the messages with reference to the previously logged MQMD details in the temp file;
5. Ends and awaits the next trigger.

As far as I am aware there is no Unit-of-Work or sync-pointing going on; and I'm only the messenger - I have already given the standard lecture in regard to efficient MQ application design and triggered applications.

ISSUE
The logging of the 'monitoring' application appears to indicate that trigger EVERY is occurring, i.e. the first log messages gives the queue depth but subsequent log messages state that the queue is empty, which is consistent with the first 'instance' removing the messages and subsequent 'instances' finding the queue empty, so the observed behaviour is that an EVERY condition is being encountered.

Obvious concerns are that when this gets ramped up to real volumes that the box hosting the queue manager is going to be run out of resources and shuffle off its mortal coil...

PROBLEM DETERMINATION
1. I ran the Trigger Monitor in the foreground to double-check what I was seeing, and before I set the trigger ON on the queue I saw the standard 'Waiting for a trigger message' print; once triggering was set ON I saw the first trigger message print on screen ('number of messages on queue...' - 'monitoring' application originated message fed back in the trigger message output) with the 'End of application trigger' print, and would have expected to see another 'Waiting for a trigger message' print and nothing else until a new set of messages arrived, however, that's not the case - the 'Waiting for a trigger message' was printed again but immediately followed by a 'Queue empty...' ('monitoring' application originated fed back in the trigger message output) message, and so on, the number of entries matching the number of messages originally on the queue;

3. I did do a trace on the Trigger Monitor (pre-FixPack application) but could see nothing obvious within it;

4. Service was applied (FixPack 4) and everything re-tested again - same result;

5. Incomplete at present - test on another piece of infrastructure and MQ version to determine whether this is application related (UoW etc.) or a bug in the platform/version build.

INITIAL CONCLUSION(S)
The only thing that presently springs to mind is that TRIGINT is not being honoured.

-----------------------------------------------------------

Any general ideas/PD ideas gratefully accepted.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.


Last edited by exerk on Tue Oct 07, 2014 5:11 am; edited 1 time in total
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Oct 06, 2014 3:25 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Whenever I have developed an application that uses Triggering, I always go back and try to read more messages withing the application and only exit the applicatino when there are no more messages to read AND the MQGET times out (Wait time).

If the message rate goes up then it might be prudent to increase that Read Wait time a bit.

I think that there is a possibility of a small window between the MQGET completing and the Queue being closed when a message could be committed to the Queue. I would be interested in knowing the preferred way to oversome this.

I know of one system that uses a triggered application where the app starts at around 06:00 with the arrival of the first message and only dies at around 22:30 when there is no more business. The MQGET Read wait period is 30 seconds. From the logs, the app seems to only get started (triggered) once a day.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Mon Oct 06, 2014 3:51 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

I'm a little fuzzy about what you are doing in your batch script. Are you saying that you start MA01 twice. Once to browse the queue and store all the MQMDs and once to actually get the messages off and write them to a file?

The reason I ask is that I wanted to check that the trigger queue is not being open for GET twice (which is a bad thing). There was an earlier thread that mentioned that MA01 opens the queue for GET even if all you want to do is do a browse. It's a small bug in MA01 that I would like to fix but my hands are tied.

Anyway, could you say a little more about exactly what your triggered script does?

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
exerk
PostPosted: Mon Oct 06, 2014 5:36 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

smdavies99, as stated, I have delivered the appropriate lecture, and of course MA01 does have get/wait switched within it...

PaulClarke, many thanks for that snippet of information and I'll cut-out test by substituting something else for MA01 and also have something that just executes it without all of the fluff around it, and tracing the calls on the queue. I can't expand with any further details of the script, the synopsis was all I could include in the OP, sorry.

Update to follow when testing is complete, thank you for the inputs, much appreciated.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Oct 07, 2014 2:18 am    Post subject: UPDATE! Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

PaulClarke, many thanks for the pointer - the behavior was the same on another system and another platform, so triggering is out; it's going to be run as a queue manager service instead, which by the nature of what it's doing is a better option anyway as far as I'm concerned.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 07, 2014 4:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Just a note that MA01 is now shipping as part of MQ v8.

Or at least, an IBM version of qload is shipping.

http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.ref.adm.doc/q117660_.htm?lang=en
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Oct 07, 2014 5:03 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
Just a note that MA01 is now shipping as part of MQ v8.

Or at least, an IBM version of qload is shipping.

http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.ref.adm.doc/q117660_.htm?lang=en


It's gone legit!

They'll include saveqmgr in the base package next. Oh wait....

What sort of a world is it that we live in, where you don't need to download a raft of support pacs because all the functionality you need is in the base product? Can someone please tell me that?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Tue Oct 07, 2014 6:30 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Just to avoid any confusion....QLOAD is MO03 not MA01. MA01 is the Q program which is not, as far as I know, included in MQ V8.

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Triggering 'EVERY' - or is it? SOLVED (sort of)
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.