Focal Point
ControlAgent

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/1401098872

April 03, 2008, 05:44 AM
ibi_Asif
ControlAgent
Hi All,

i would like to use a controlAgent in a PFLOW to stop a the listener that owns the thread if an error is doscovered in processing. This is to stop processing of messages until the error/issue is resoved.

I have not used this before in a solution environment apart from using it in a failover scenario. Does any have any opinions/views/experience that they could share me so i know what i type of errors the control method should be used for, any gotchas or design considerations of the pflow?


i will using it in an asynchoronous multithreaded environment. The listener will be in transaction manager mode. The listener is an MQ listener. This is a event driven realtime environment.

thank you.
April 09, 2008, 04:57 AM
AdeH
Hi,
If the listener just happens to be an MQ listener (ahem!) then it may be possible to use the folowing technique: Get the pflow to send a PCF format command message via MQ to the queue managers SYSTEM.ADMIN.COMMAND.QUEUE to tell it to 'get inhibit' the MQ queue. This will stop *any* application from getting messages from this MQ queue, but won't stop new messages from arriving on the queue.
I can't say that I've tested this, but I'm predicting the behaviour of the listener will be to stop itself when it receives an error message when tring to read from the 'get inhibited' MQ queue.


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
April 09, 2008, 05:11 AM
ibi_Asif
Hi,

Thank you for your response. I think that is an important option to have. since in this environment this is an MQ listener (ahem) and the queue has only a single consumer than this may be an option we can use. you are right, i will need to understand and test the behaviour of the our mq listener to see how it behaves when it recieves an error when trying to pull a message of the queue. Also MQ will need to be configured to allow the iWay process to send a adminitratior type command to MQ. (dnt know much about this).

i believe the MQ listener, in theory, when it tries to pull a message of MQ will get an error. The listner will then have a look at the 'RETRY' interval setting in iWay and continue to poll in error for the set period of time before going into a complete stop state.
April 18, 2008, 11:09 AM
Ganesh Iyer
i have used a control agent on a number of occasions. It works fine. The only thing i notice is that once the agent issues a stop for the requsite listener, any transaction in flight will get completed before the listener stops .... which may not be a bad thing


iWay 55 SM SP2