Subscription Create Behaviour


Slade, Michael J
 

Hi OpenMAMA Dev,

 

I wanted to clarify the expected behavior surrounding creation of subscriptions during application startup – should subscription activations always be executed by the thread dispatching events off the throttle queue?

 

Taking mamalistenc as an example, subscriptions can be created before we start dispatching on the default event queue. If the throttle rate is non-zero, the subscriptions’ activations are added to the throttle queue after the set interval has expired, but will not be executed until we start dispatching on the queue when we call mama_start.

 

The other behavior we see is if the throttle is disabled (the rate is set to <=0). The subscriptions’ activations are executed immediately on the calling thread – ignoring the queue - before the mama_start call due to the below code snippet. This results in the subscription being created on the transport and messages being received from the middleware before the mama_start call. Is this expected/allowed behavior?

 

Throttle.c:

if (self->mRate <= 0.0)

{

    /* throttle is not in use, execute immediately */

    mama_log (MAMA_LOG_LEVEL_FINEST, "wombatThrottle_dispatch (): "

              "no throttle; triggering action.");

    actionCb (closure1, closure2);

}

 

Thanks in advance,

Mike

This message is confidential and subject to terms at: https://www.jpmorgan.com/emaildisclaimer including on confidential, privileged or legal entity information, malicious content and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.

Join Openmama-dev@lists.openmama.org to automatically receive all group messages.