Class EsbTriggerControl

java.lang.Object
com.kingsrook.qqq.esb.runtime.EsbTriggerControl

public class EsbTriggerControl extends Object
Pause, resume, or restart a trigger's consumers on every node (spec sections 6 and 8). Each call sends { "action", "triggerName" } to the non-durable control topic (qqq.esb.control) on the trigger's provider; every running QEsbRuntime listening there - this node's included - applies it to its own runner (see EsbControlChannel). The call returns once the message is sent, not once the nodes have applied it. The trigger is looked up in the QContext's instance, by its name (processName.destinationName); an unknown trigger is a QException, as is a message that can't be sent (e.g., with the broker down). Pause state isn't persisted: a node that starts (or restarts) later uses the trigger's startPaused.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    pause(String triggerName)
    Pause the trigger on every node: consumers close, and messages wait on the broker.
    static void
    restart(String triggerName)
    Restart the trigger's consumers on every node: each builds a new session and consumer (a paused trigger stays paused).
    static void
    resume(String triggerName)
    Resume the trigger on every node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • pause

      public static void pause(String triggerName) throws QException
      Pause the trigger on every node: consumers close, and messages wait on the broker.
      Throws:
      QException
    • resume

      public static void resume(String triggerName) throws QException
      Resume the trigger on every node.
      Throws:
      QException
    • restart

      public static void restart(String triggerName) throws QException
      Restart the trigger's consumers on every node: each builds a new session and consumer (a paused trigger stays paused).
      Throws:
      QException