...
- amq_jquery_adapter.js
- amq.js
- stomp.js
Configuring STOMP
...
Note: Hari is working on inserted the STOMP libraries into the project . There may be some changes to the following using npm to install the libraries.
...
Setup your handler:
Code Block | ||
---|---|---|
| ||
subscribeNotification() {
this.loggedInZoneUuid = localStorage.getItem('zoneUuid');
this.client = Stomp.client(Config.ACTIVEMQ_CLIENT);
let topicUrl = '/topic/' + this.loggedInZoneUuid;
let connectHeaders = {
login: Config.ACTIVEMQ_USER_NAME,
passcode: Config.ACTIVEMQ_PASSWORD,
'client-id': this.loggedInZoneUuid
};
let componentRef = this;
let callback = function (message) {
// called when the client receives a STOMP message from the server
componentRef.toastr.info(message.body);
componentRef.incrementUnreadNotificationCount();
};
let subscribeHeaders = {'activemq.subscriptionName': this.loggedInZoneUuid};
this.client.connect(connectHeaders, function () {
componentRef.client.subscribe(topicUrl, callback, subscribeHeaders);
}
); |
...
Event | Event Type | Default Scope | Additional Payload |
---|---|---|---|
A zone is created | ZONE_POST | ALL | none |
A zone is updated | ZONE_PUT | ALL | none |
A zone is deleted | ZONE_DELETE | ALL | none |
A zone's thumbnail image is updated (TBD) | ZONE_THUMBNAIL_PUT | ALL | TBD |
A data domain is created or a new version of of the data domain has been created | DOMAIN_POST | ALL | TBD |
A data domain has been created | DOMAIN_PUT | ALL | TBD |
A data domain has been deleted | DOMAIN_DELETE | ALL | TBD |
An MDR has been created for a given data domain (TBD) | DOMAIN_NAME_DATA_POST | ALL | TBD |
An MDR has been updated in a given data domain (TBD) | DOMAIN_NAME_DATA_PUT | ALL | TBD |
An MDR has been deleted in a give data domain (TBD) | DOMAIN_NAME_DATA_DELETE | ALL | TBD |
Payload
The payload for an event includes:
...