Classes Files

Wombat::MamaSubscriptionCallback

This interface should be implemented by clients wish to create a MAMA subscription, it contains callback functions that will be invoked whenever specific events occur.

Public Functions

  Name
void onCreate(MamaSubscription subscription)
Called when subscription creation is complete, and before the onMsg() callback is invoked
void onError(MamaSubscription subscription, MamaStatus.mamaStatus status, string subject)
Called when an error has occurred with the subscription
void onGap(MamaSubscription subscription)
Function invoked when a sequence number gap is detected. At this point the topic is considered stale and the subscription will not receive further messages until the feed handler satisfies a recap request.
void onMsg(MamaSubscription subscription, MamaMsg message)
Invoked when a message arrives
void onQuality(MamaSubscription subscription, mamaQuality quality, string symbol)
Invoked to indicate a data quality event.
void onRecapRequest(MamaSubscription subscription)
Invoked when a recap is requested upon detecting a sequence number gap.
void onDestroy(MamaSubscription subscription)
Function invoked when a subscription has been destroyed or deactivated.

Public Functions Documentation

function onCreate

void onCreate(
    MamaSubscription subscription
)

Called when subscription creation is complete, and before the onMsg() callback is invoked

Parameters:

  • subscription The subscription that has been created.

function onError

void onError(
    MamaSubscription subscription,
    MamaStatus.mamaStatus status,
    string subject
)

Called when an error has occurred with the subscription

Parameters:

  • subscription The subscription where the error has been detected.
  • status The status code associated with the error.
  • subject The subject for entitlement errors.

function onGap

void onGap(
    MamaSubscription subscription
)

Function invoked when a sequence number gap is detected. At this point the topic is considered stale and the subscription will not receive further messages until the feed handler satisfies a recap request.

Parameters:

  • subscription The subscription where the gap has been detected.

function onMsg

void onMsg(
    MamaSubscription subscription,
    MamaMsg message
)

Invoked when a message arrives

Parameters:

  • subscription The subscription where the message has arrived.
  • message The message.

function onQuality

void onQuality(
    MamaSubscription subscription,
    mamaQuality quality,
    string symbol
)

Invoked to indicate a data quality event.

Parameters:

  • subscription The subscription where the quality has changed.
  • quality The new quality.
  • symbol The symbol.

function onRecapRequest

void onRecapRequest(
    MamaSubscription subscription
)

Invoked when a recap is requested upon detecting a sequence number gap.

Parameters:

  • subscription The subscription where the recap has been requested.

function onDestroy

void onDestroy(
    MamaSubscription subscription
)

Function invoked when a subscription has been destroyed or deactivated.

Parameters:

  • subscription The subscription that has been destroyed.

Updated on 2023-03-31 at 15:29:33 +0100