Contact Free trial Login

Runtime Manager Agent Notifications

logo cloud disabled logo hybrid active logo server active logo pcf disabled

The Runtime Manager agent publishes notifications, in JSON format, about events that occur in the Mule instance. This allows you to implement your own system for receiving and handling notifications. Notifications are sent over both the REST and WebSocket transports (for more information on transports refer to the Runtime Manager agent architecture documentation).

Configure the Mule Agent Notifications Callback URL

To receive notifications on the specified URL, you must first configure the callback URL in the mule-agent.yml file inside the REST transport section as shown below.

To enable notification to be sent, you must enable the rest.agent.transport section. Also ensure the configured URL ends with a trailing slash (/). This is required since the agent will append the path to it.
  rest.agent.transport:
    enabled: true
    callback:
      url: http://localhost:8080/
    port: 8888

Application Deployment Notifications

The Runtime Manager agent sends a notification every time there is a change in state during an application deployment or undeployment. Notifications are sent via a PUT request to the applications/<appname>/deployment path:

PUT <callback URL>/applications/<application name>/deployment HTTP/1.1

Example Notification

{
  "application": {
    "name": "applicationName",
    "domain": "domainName",
    "state": "STARTED"
  },
  "status": "DEPLOYED",
  "message": "Application successfully deployed."
}

Notification Fields

Fields in each application deployment notification:

Field Description

application

Contains the following itemized information about the application:

  • Application name

  • Name of the domain to which the application is deployed

  • Current state of the application

For a list of all possible application states, see the Application States and Deployment Status section.

status

Current status of the deployment. After a deployment operation is completed, the message remains as DEPLOYED; after an undeployment operation the message remains as UNDEPLOYED.

For a list of all possible status messages, see the Application States and Deployment Status section.

message

An informational message about the current deployment stage. In case of a deployment failure, information about the reason for the failure is included in the message.

Domain Deployment Notifications

The Runtime Manager agent sends a notification every time there is a change in state during a domain deployment or undeployment.

Notifications are sent via a PUT request to the domains/<domainname>/deployment path:

PUT <callback URL>/domains/<domain name>/deployment HTTP/1.1

Example Notification

"domain": {
    "name": "domainName",
    "applications": [
      {
        "name": "application1",
        "domain": "domainName",
        "state": "STARTED"
      },
      {
        "name": "application2",
        "domain": "domainName",
        "state": "STOPPED"
      },
    ]
  },
  "status": "DEPLOYED",
  "message": "Domain successfully deployed."
}

Notification Fields

Fields in each domain deployment notification:

Field Description

domain

Contains the following itemized information about the domain:

  • Domain name

  • List of applications deployed to the domain, specifying:

    • Application name

    • Domain name

    • Application status

status

Current status of the deployment. After a deployment operation is completed, the message remains as DEPLOYED; after an undeployment operation the message remains as UNDEPLOYED.

For a list of all possible status messages, see the Application States and Deployment Status section.

message

An informational message about the current deployment stage. In case of a deployment failure, information about the reason for the failure is included in the message.

Keep-Alive Notifications

The Runtime Manager agent sends a periodic keep-alive notification to verify that the Mule instance is still running. The notification is sent via a POST request with an empty body to the keepAlive path:

POST <callback URL>/keepAlive HTTP/1.1

Application States and Deployment Status

Application States

Application states represent the different stages in the lifecycle of a Mule application.

Valid application states:

  • CREATED

  • INITIALISED

  • STARTED

  • STOPPED

  • DEPLOYMENT_FAILED

  • DESTROYED

Deployment Status

Deployment statuses represent the different steps for successful deployment or undeployment of an application or a domain.

Valid deployment statuses:

  • DEPLOYMENT_STARTED

  • DEPLOYED

  • CONTEXT_CREATED

  • CONTEXT_INITIALISING

  • CONTEXT_INITIALISED

  • CONTEXT_STARTING

  • CONTEXT_STARTED

  • CONTEXT_CONFIGURED

  • CONTEXT_STOPPING

  • CONTEXT_STOPPED

  • CONTEXT_DISPOSING

  • CONTEXT_DISPOSED

  • UNDEPLOYING

  • UNDEPLOYED

  • DEPLOYMENT_FAILED

  • UNDEPLOYMENT_FAILED