Have an existing Server process which Waits on MQ Messages, and processes them when they come in.
Currently writing, in C, a signal handling routine responsible for the following (on receipt of SIGUSR1).
1. MQCLOSE current Queue.
2. MQDISC current MQ Manager.
3. Re-Read Config File (contains new MQ Conn Info).
4. MQCONN to new MQ Manager obtained from Config File.
5. MQOPEN new Queue obtained from Config File.
6. Continue normal processing.
My problem is that the current Server routines that I'm interfacing with use an MQGET call with the GMO.Options set to MQGMO_WAIT, and the GMO.WaitInterval set to MQWI_UNLIMITED. (ie. Wait forever till you get a message).
In this situation, my routine is called on receipt of the relevent signal, and my MQCLOSE and MQDISC calls fail due to it recognising that the MQGET call has not yet completed.
These MQCLOSE and MQDISC fails result in a Return Code of 2219 (MQRC_CALL_IN_PROGRESS).
So does anyone know of a way, within my signal handling routine, to either
a) Force the MQGET into a fail state, so that the MQCLOSE and MQDISC routines can complete without failure.
b) Force the MQCLOSE and MQDISC routines to operate without care or concern for the state of the preceeding MQGET call.
Help, Opinions, or even just plan sympathy ;-) welcome.
____________________
Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debuging Mondays code.
Currently writing, in C, a signal handling routine responsible for the following (on receipt of SIGUSR1).
1. MQCLOSE current Queue.
2. MQDISC current MQ Manager.
3. Re-Read Config File (contains new MQ Conn Info).
4. MQCONN to new MQ Manager obtained from Config File.
5. MQOPEN new Queue obtained from Config File.
6. Continue normal processing.
My problem is that the current Server routines that I'm interfacing with use an MQGET call with the GMO.Options set to MQGMO_WAIT, and the GMO.WaitInterval set to MQWI_UNLIMITED. (ie. Wait forever till you get a message).
In this situation, my routine is called on receipt of the relevent signal, and my MQCLOSE and MQDISC calls fail due to it recognising that the MQGET call has not yet completed.
These MQCLOSE and MQDISC fails result in a Return Code of 2219 (MQRC_CALL_IN_PROGRESS).
So does anyone know of a way, within my signal handling routine, to either
a) Force the MQGET into a fail state, so that the MQCLOSE and MQDISC routines can complete without failure.
b) Force the MQCLOSE and MQDISC routines to operate without care or concern for the state of the preceeding MQGET call.
Help, Opinions, or even just plan sympathy ;-) welcome.
____________________
Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debuging Mondays code.