Orchestrator Policy: AMQP Subscription

by Simon Sparks · 28 January 2026

This is the TypeScript definition of policy specifically an AMQP Subscription which can be downloaded from the VMware GitHub repository.

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: Policy_AMQP.pl.ts

import { PolicyTemplate } from "vrotsc-annotations";

@PolicyTemplate({
    name: "Event Listener",
    path: "Policies/AMQP",
    templateVersion: "v2",
    variables: {
        sample: {
            type: "string",
            value: "",
            description: "Description"
        }
    },
    elements: {
        sample: {
            type: "AMQP:Subscription",
            events: {
                onMessage: "onMessage"
            }
        }
    }
})
export class EventListener {
    onMessage(self: AMQPSubscription, event: any):void {
        
        let objAMQPMessage:AMQPMessage = self.retrieveMessage(event);

        System.log(`Received message ${objAMQPMessage.bodyAsText}`);
    }
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.