0

How to track connectivity state for async message listener? ExceptionHandler to tag it as broken but how to know when its up again?

Does setting reconnect continue forever? Seems to be indicated as that way - thus timeout is interval to reconnect rather than when it stopps/gives up.

Reconnecting to IBM MQ Queue on connection failure

"No reconnection attempts are made after the timeout has expired. When the system detects that the timeout has expired it returns a MQRC_RECONNECT_FAILED error."

How to manually stop/teardown with async - since everything seems to throw exceptions i.e. setting listener to null when stopped throws exception, calling close on consumer can cause exception etc. I.e. stop on consumer: IBM.XMS.IllegalStateException: The method MQCTL failed.

llarsson
  • 33
  • 7
  • If the app loses connectivity the reconnect starts and happens every few seconds for the duration of the reconnect Timeout, if it is still unable to connect it gives up and a `MQRC_RECONNECT_FAILED` is returned. When it "notices" the connection is broken depends on the heart beat of the channel, the default is 300 seconds, this means a broken connection may not be realized for up to 360 seconds, this is when reconnect starts. – JoshMc Jan 06 '21 at 18:38
  • So using the .net framework XMS library - where can you see "MQRC_RECONNECT_FAILED" cannot see any property or callback How to reconnect in that case / a fool proof reconnect code. From all states / considering client code throws exception depending on its own internal/private state i.e. closed then throw exception. – llarsson Jan 07 '21 at 08:24

0 Answers0