Skip to content

Node process doesn't exit if the destination is not available #46

@niyazhussain

Description

@niyazhussain

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions