I stopped the fluentd server and tried the below code with node
const FluentClient = require("@fluent-org/logger").FluentClient;
const flDlogger = new FluentClient("test", {
eventMode: "Message",
socket: {
host: "localhost",
port: 24224,
timeout: 3000,
}
});
flDlogger.emit({}).then(() => { console.log("Sent Message Successfully")}).catch((e) => { console.log(e);})
The node process did not timeout/quit until the server becomes available, is there any flag/way to exit the node process if the destination becomes unavailable, i want to try this in AWS lambda and if the destination is not available then the lambda may run always.