Reputation: 1079
How to identify a channel type(sender or receiver) through the event messages sent by the queue manager to queue SYSTEM.CHANNEL.EVENT.QUEUE during a channel stopped or retrying state ?
I'm reading it using class PCFMessage.
Upvotes: 3
Views: 848
Reputation: 31832
The event message contains the channel name but not the type. (See Channel and Bridge Events topic in the Infocenter for specifics.)
My approach for this is that when my monitoring program starts up, I issue a PCF message to display all the channel names and their type and then store this information in a table. (The PCF equivalent of DIS CHL(*) CHLTYPE
.) Then as the channel events arrive, match the channel name to the table entry to retrieve the channel type. It is of course possible to cache any number of the static channel attributes such as CONNAME
, MCAUSER
, etc. and you can ask for as many as you need in the PCF command.
If an event shows up for a channel not in the table, you can always issue a new PCF command to look up the new channel on the fly and then add the attributes to the cache you built when the program started. Hopefully, your QMgr is not so volatile as to define new channels so often that this would be a problem. However, if that were the case you could enable configuration events and then you'd be notified when new channels were defined.
Upvotes: 3