VMware Cloud Director allows a system administrator to configure many operations as blocking tasks, which are suspended until a system administrator acts on them or a preconfigured timer expires. Blocking tasks generate AMQP messages that you can use to automate the handling of the underlying user request. A system administrator can also enable nonblocking AMQP notifications of all system events.
The system administrator can configure the VMware Cloud Director AMQP service to provide a stream of notifications about events in the cloud. By configuring specific tasks as blocking and writing AMQP clients that process the messages generated when these tasks are launched, you can create a programmatic facility for reviewing and acting on tenant requests. When a user requests an operation that has been configured as a blocking task, the system sends a message about the task to the configured AMQP broker. The system also creates a reference to the task in the cloud's BlockingTaskReferences container. A system administrator can retrieve the list of BlockingTask elements by making a GET request to the system's blockingTasks link, or to a URL included in the AMQP message.
For more information about the VMware Cloud Director AMQP service, see #GUID-BEE98E2A-1E11-4813-AEB2-6E6FFB79E890.
Subscribing to Notifications
- An XML document, which is sent to the AMQP exchange specified in the system AmqpSettings.
- A JSON object, which is sent to an AMQP exchange whose name has the form
prefix.notifications20
, where prefix is the value of the AmqpPrefix element in the system AmqpSettings.
AMQP client programs can connect to the broker and specify components of the AMQP routing key to indicate their interest in messages based on content. For example, a client can use the routing key to request the broker to send it all messages from a specific organization, or all messages that indicate a failed task. See Routing Key Format.
Processing Messages from Blocking Tasks
Messages from blocking tasks are also sent to the configured message broker, and clients can use the routing key to indicate their interest in these messages. See Subscribing to Notifications. Messages from blocking tasks contain additional information about the task itself. Clients that process these messages can use the VMware Cloud Director API to authenticate to the system and act on the blocked task.