• Creates a Gauge metric with the name ax_messaging which can be added to a metric registry. This metric will have an integer value of the duration in seconds if the service can acquire a service account token, send a message, and afterwards receive it. Or a value of 0 otherwise.

    Parameters

    • healthCheckRoutingKey: string

      The RabbitMQ routing key for sending the outbox message

    • storeOutboxMessage: StoreOutboxMessage

      The outbox storage function for starting the message processing

    • getAccessToken: (() => Promise<string>)

      Get the access token with admin permissions to include in the message

        • (): Promise<string>
        • Returns Promise<string>

    • ownerPool: Pool

      The database owner pool as this is independent of an environment

    • timeoutMs: number = 30_000

      The optinal timeout in milliseconds after which the messaging should be considered as failure

    Returns Metric<string>

    A Gauge metric with a name ax_messaging.

Generated using TypeDoc