vCO Workflow Script to Create an AMQP Subscription

The following is the vCO Workflow Script to Create an AMQP SubScription

 

var objAMQPBroker;
	objAMQPBroker = AMQPBrokerManager.addBroker({host: "rabbitmq.vcoflow.co.uk", port: 5672, username: "vcloud", password: "P@55w0rd!", virtualHost: "/", useSSL: false, acceptAllCertificates: true, name: "RabbitMQ"});
	objAMQPBroker.validate();
	objAMQPBroker.declareExchange("vCloudExchange", {type: "topic", durable: true, autoDelete: false});
	objAMQPBroker.declareQueue("vCloudNotifications", {durable: true, exclusive: false, autoDelete: false});
	objAMQPBroker.bind("vCloudNotifications", "vCloudExchange", {routingKey: "#"});

var objAMQPSubscription;
	objAMQPSubscription = objAMQPBroker.subscribe(["vCloudNotifications"], {name: "vCloudSubscription"});

Leave a Reply