You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a few issues with how callbacks are routed from the single MQCALLBACK_Go entrypoint to the user-specified go callback function:
if any connection-wide "Event Handler" callback is registered, it will get called for an event (like, say, MQRC_CONNECTION_BROKEN) once for each queue-specific callback that's also registered
if any connection-wide "Event Handler" callback is registered, all callback-specific events requested via MQCBDO_ (like MQCBDO_START) will get routed to it rather than to the specific registered callbacks
if no connection-wide "Event Hander" callback is registered, then all the other events (MQCBDO_START etc) get dropped.
MQCBDO_REGISTER events could be dropped completely, as items aren't added to the cbMap structure until after the underlying CB call
One possible fix for this would be to instead index the cbMap by some opaque pointer that can be passed through the C MQCBD structure. Proof of concept here: master...louissobel:mq-golang:louis-fix-callbacks
The text was updated successfully, but these errors were encountered:
There's a few issues with how callbacks are routed from the single
MQCALLBACK_Go
entrypoint to the user-specified go callback function:MQRC_CONNECTION_BROKEN
) once for each queue-specific callback that's also registeredMQCBDO_START
) will get routed to it rather than to the specific registered callbacksMQCBDO_START
etc) get dropped.MQCBDO_REGISTER
events could be dropped completely, as items aren't added to thecbMap
structure until after the underlyingCB
callThe root of most of these is that the
cbMap
is indexed byhConn, hObj
, but calltypes other than MESSAGE_REMOVED seem to omit thehObj
, so thekey
that gets computed (https://github.com/ibm-messaging/mq-golang/blob/master/ibmmq/mqicb.go#L101) sometimes points at the wrong callback, or sometimes the fallback branch is taken when it should not be (https://github.com/ibm-messaging/mq-golang/blob/master/ibmmq/mqicb.go#L111).One possible fix for this would be to instead index the
cbMap
by some opaque pointer that can be passed through the C MQCBD structure. Proof of concept here: master...louissobel:mq-golang:louis-fix-callbacksThe text was updated successfully, but these errors were encountered: