Getting started Community Training Tutorials Documentation APIs, AI & Tools
transports:
rest.agent.transport:
enabled: true
callback:
url: http://localhost:8080/
port: 8888
The Anypoint Runtime Manager agent publishes notifications, in JSON format, about events that occur in the Mule instance. This enables you to implement a system for receiving and handling notifications. Notifications are sent over both the REST and WebSocket transports. For more information about transports, see Runtime Manager Agent Architecture.
To forward Runtime Manager agent notifications to a URL over the REST transport, configure a callback URL in the mule-agent.yml file.
To configure the callback URL:
Add the callback URL to the mule-agent.yml file:
transports:
rest.agent.transport:
enabled: true
callback:
url: http://localhost:8080/
port: 8888
The values for port and url depend on the external server that will receive the notifications.
The configured URL must end with a trailing slash (/) because the agent appends the path to the URL.
Restart Mule runtime engine.
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
{
"application": {
"name": "applicationName",
"domain": "domainName",
"state": "STARTED"
},
"status": "DEPLOYED",
"message": "Application successfully deployed."
}
Fields in each application deployment notification:
| Field | Description |
|---|---|
|
Contains the following itemized information about the application:
For a list of all possible application states, see the Application States and Deployment Status section. |
|
Current status of the deployment. After a deployment operation is completed, the message remains as For a list of all possible status messages, see the Application States and Deployment Status section. |
|
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. |
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
"domain": {
"name": "domainName",
"applications": [
{
"name": "application1",
"domain": "domainName",
"state": "STARTED"
},
{
"name": "application2",
"domain": "domainName",
"state": "STOPPED"
},
]
},
"status": "DEPLOYED",
"message": "Domain successfully deployed."
}
Fields in each domain deployment notification:
| Field | Description |
|---|---|
|
Contains the following itemized information about the domain:
|
|
Current status of the deployment. After a deployment operation is completed, the message remains as For a list of all possible status messages, see the Application States and Deployment Status section. |
|
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. |
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 represent the different stages in the lifecycle of a Mule application.
For the list of application states, see Application Status States.
Deployment statuses represent the different steps for successful deployment or undeployment of an application or a domain.
For the list of valid deployment statuses, see Application Deployment States.