Gathering detailed insights and metrics for architect-stompjs
Gathering detailed insights and metrics for architect-stompjs
Gathering detailed insights and metrics for architect-stompjs
Gathering detailed insights and metrics for architect-stompjs
npm install architect-stompjs
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
62 Commits
1 Forks
9 Watching
9 Branches
2 Contributors
Updated on 10 Jun 2021
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
25%
15
Compared to previous day
Last week
-21.7%
36
Compared to previous week
Last month
87.4%
283
Compared to previous month
Last year
16.9%
1,961
Compared to previous year
Expose a stompit client as an architect service.
1npm install --save architect-stompjs
1{ 2 "packagePath": "architect-stompjs", 3 config: [{ 4 host: 'localhost', 5 port: 61613 6 }] 7}
Config element is an array of servers as in stompit connection servers.
####Â srv
Aternatively, specify a SRV dns name to lookup hosts and ports from DNS.
1{ 2 "packagePath": "architect-stompjs", 3 srv: { 4 name: 'activemq.example.com' 5 opts: { 6 connectHeaders: { 7 'heart-beat': '25000,25000' 8 } 9 } 10 } 11}
Add a queues
object to configure queues avaliable in your application.
Add a topics
object to configure topics avaliable in your application.
Boot Architect :
1var path = require('path'); 2var architect = require("architect"); 3 4var configPath = path.join(__dirname, "config.js"); 5var config = architect.loadConfig(configPath); 6 7architect.createApp(config, function (err, app) { 8 if (err) { 9 throw err; 10 } 11 console.log('application started'); 12});
This module require architect-log4js or equivalent as logging service.
Configure sptom service with config.js
:
1module.exports = [{ 2 packagePath: "architect-stompjs" 3}{ 4 packagePath: "architect-log4js" 5}, './routes'];
Consume stomp service in your application :
1{ 2 "name": "routes", 3 "version": "0.0.1", 4 "main": "index.js", 5 "private": true, 6 7 "plugin": { 8 "consumes": ["stomp"] 9 } 10}
Eventually use the stomp
service in your app :
1module.exports = function setup(options, imports, register) { 2 var stomp = imports.stomp; //get stomp client 3 stomp.channel.send('/queue/myqueue', {}, 'application has started.'); 4 register(); 5};
Configure your alias in the architect config.js
file :
1{ 2 "packagePath": "architect-log4js", 3 config: [{ 4 host: 'localhost', 5 port: 61613 6 }], 7 queues: { 8 'myqueue' : { 9 'destination': '/queue/my.queue.name.is.super.long' 10 'ack': 'client', 11 } 12 } 13}
Now you can send and recieve messages with the queue alias :
1module.exports = function setup(options, imports, register) { 2 var client = imports.stomp; //get stomp client 3 var myqueue = client.queues.myqueue; 4 myqueue.send('application has started.'); 5 register(); 6};
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/27 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More