The older versions of VMware Cloud Director used AMQP protocol to exchange messages (such as system notifications or any other update) with another VCD cell. Starting with VCD 10.1, MQTT replaced AMQP. To learn more about how VCD used MQTT, see product documentation.
If you have an environment that still uses AMQP (e.g., VCD upgraded from version <=10.1) and wants to replace it with MQTT, you must first delete the AMQP broker settings from VCD. Unfortunately, it is not currently feasible to delete the settings from the GUI and must be done through APIs.
In the VCD GUI, you only see 2 options for the AMQP broker: Edit settings and Test AMQP config. There is no delete option.
In this post, I will show what APIs you need to delete AMQP broker settings.
Step 1: Get AMQP Broker Configuration
Note: The below APIs are applicable for VCD 10.5.1. If you are running an older version of VCD, check the supported API versions that you can use.
1 2 3 4 5 6 7 |
Method: GET URL: https://{{vcd_host}}/api/admin/extension/settings/amqp Authorization: Bearer Token Request Headers: Accept: application/*+json;version=39.0.0-alpha |
The GET call returns a json in response containing the AMQP broker setting that you see in VCD GUI.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
----snipped output---- { "href":"https://vcd01.lab.vmw/api/admin/extension/settings/amqp", "type":"application/vnd.vmware.admin.amqpSettings+json", "amqpHost":"rmq.lab.vmw", "amqpPort":5672, "amqpUsername":"vcdamqp", "amqpPassword":null, "amqpExchange":"systemExchange", "amqpVHost":"/", "amqpUseSSL":false, "amqpPrefix":"vcd", "vCloudExtension":[] } |
Step 2: Remove AMQP Broker Settings
To achieve this, you need to run a ‘PUT’ method to the /admin/extension/settings/amqp API. You have to delete the value of the amqpHost key from the response that you received in Step 1 and pass that as a payload to the PUT call.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Method: PUT URL: https://{{vcd_host}}/api/admin/extension/settings/amqp Authorization: Bearer Token Headers: Accept: application/*+json;version=39.0.0-alpha, Content-Type: application/*+json Payload: { "href":"https://vcd01.lab.vmw/api/admin/extension/settings/amqp", "type":"application/vnd.vmware.admin.amqpSettings+json", "amqpHost":"", "amqpPort":5672, "amqpUsername":"vcdamqp", "amqpPassword":null, "amqpExchange":"systemExchange", "amqpVHost":"/", "amqpUseSSL":false, "amqpPrefix":"vcd", "vCloudExtension": [] } |
After deleting the broker settings, navigate to Administration > Extensibility in the VCD UI and validate that the AMQP broker settings are removed.
I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing.