You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to publish a very basic message to my synadia account and I get maybe one message through every couple of days using the node client, but I can send them consistently through golang.
Expected behavior
Every message sent ends up in my synadia account or an error message is thrown if there is an issue
Server and client version
server: whatever synadia is using
windows client:
> nats --version
v0.1.4
node dependency: "nats": "^2.28.2",
Host environment
Running it locally on windows 11 as well as some amazon boxes
const { connect, credsAuthenticator } = require("nats");
const fs = require('fs');
const path = require('path');
const { v4: uuidv4 } = require('uuid');
const test = async () => {
const filePath = path.join(__dirname, './~~~synadia~~~.creds');
const data = fs.readFileSync(filePath, 'utf8');
const natsConnection = {
servers: "tls://connect.ngs.global",
authenticator: credsAuthenticator(new TextEncoder().encode(data)),
};
const nc = await connect(natsConnection);
if (!nc) {
throw new Error("NATS connection is not established");
}
const done = nc.closed();
const transactionId = uuidv4();
const testEmailToSend = {
"message": "Never gonna give you up....but, actually I might. We just aren't clicking. I'm sorry, it's over. Find someone else. Or don't, I don't care. You broke my heart, Ethel, I'm not gonna let you do it again!",
"image_url": "https://media1.tenor.com/m/x8v1oNUOmg4AAAAd/rickroll-roll.gif"
};
try {
console.log('sending', emailToSend);
nc.publish("communications", JSON.stringify(emailToSend));
console.log("Sent!");
}
catch (error) {
console.error("Failed to send email to: ", error);
}
}
test();
Running node test.js shows the console logs but nothing shows up in synadia. However a golang version using the same credentials & connection information & test message shows up just fine
The text was updated successfully, but these errors were encountered:
Observed behavior
I'm trying to publish a very basic message to my synadia account and I get maybe one message through every couple of days using the node client, but I can send them consistently through golang.
Expected behavior
Every message sent ends up in my synadia account or an error message is thrown if there is an issue
Server and client version
server: whatever synadia is using
windows client:
node dependency:
"nats": "^2.28.2",
Host environment
Running it locally on windows 11 as well as some amazon boxes
Steps to reproduce
package.json:
test.js:
Running
node test.js
shows the console logs but nothing shows up in synadia. However a golang version using the same credentials & connection information & test message shows up just fineThe text was updated successfully, but these errors were encountered: