Interface MamaQueueMonitorCallback


  • public interface MamaQueueMonitorCallback
    Definition of the callback methods enabling event queue monitoring. Receiving callbacks when either the high watermark or the low watermark are exceeded. Not all middlewares will support the concept of both high and low watermarks. Concrete instances of this interface are registered with an event queue using the MamaQueue.setQueueMonitorCallback ().
    • Method Detail

      • onHighWatermarkExceeded

        void onHighWatermarkExceeded​(MamaQueue queue,
                                     long size)
        Called when the specified high watermark threshold for the event queue has been exceeded.
        Parameters:
        queue - The MamaQueue for which the high watermark was exceeded.
        size - The number of outstanding events on the event queue.
      • onLowWatermark

        void onLowWatermark​(MamaQueue queue,
                            long size)
        Called when the number of events on the event queue go below the specified low watermark. This is currently only supported for the WombatTCP middleware.
        Parameters:
        queue - The MamaQueue for which the high watermark was exceeded.
        size - The number of outstanding events on the event queue.