Skip to content

Commit

Permalink
Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
ng-galien committed Apr 10, 2024
1 parent 2809f9c commit 20ef136
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on:
push:
branches: [main]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "20"
- run: npm ci
- run: npm test
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: "3.5"

services:
pulsar:
image: apachepulsar/pulsar:3.1.1
command: ["bin/pulsar", "standalone"]
image: apachepulsar/pulsar:3.0.2
command: ["bin/pulsar", "standalone", "--no-functions-worker", "--no-stream-storage"]

nodered:
build: .
Expand Down
26 changes: 13 additions & 13 deletions src/pulsar-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
const Pulsar = require('pulsar-client');

module.exports = function(RED) {
function PulsarConfigNode(n) {
RED.nodes.createNode(this,n);
function PulsarConfigNode(parameters) {
RED.nodes.createNode(this, parameters);
const node = this;
node.on('close', function(removed, done) {
if (node.client && removed) {
Expand Down Expand Up @@ -35,17 +35,17 @@ module.exports = function(RED) {
}
});
node.client = new Pulsar.Client({
serviceUrl: n.serviceUrl,
authentication: buildAuthentication(n.authentication),
operationTimeoutSeconds: n.operationTimeoutSeconds,
ioThreads: n.ioThreads,
messageListenerThreads: n.messageListenerThreads,
concurrentLookupRequest: n.concurrentLookupRequest,
useTls: n.useTls,
tlsTrustCertsFilePath: n.tlsTrustCertsFilePath,
tlsValidateHostname: n.tlsValidateHostname,
tlsAllowInsecureConnection: n.tlsAllowInsecureConnection,
statsIntervalSeconds: n.statsIntervalSeconds
serviceUrl: parameters.serviceUrl,
authentication: buildAuthentication(parameters.authentication),
operationTimeoutSeconds: parameters.operationTimeoutSeconds,
ioThreads: parameters.ioThreads,
messageListenerThreads: parameters.messageListenerThreads,
concurrentLookupRequest: parameters.concurrentLookupRequest,
useTls: parameters.useTls,
tlsTrustCertsFilePath: parameters.tlsTrustCertsFilePath,
tlsValidateHostname: parameters.tlsValidateHostname,
tlsAllowInsecureConnection: parameters.tlsAllowInsecureConnection,
statsIntervalSeconds: parameters.statsIntervalSeconds
});
} catch (e) {
node.error('Error creating pulsar client: ' + e);
Expand Down

0 comments on commit 20ef136

Please sign in to comment.