Skip to content

Implement Asynchronous Processing Using C Async Function #14

@k2la

Description

@k2la

Currently, asynchronous processing in this client library is implemented by using NAPI::AsyncWorker.
e.g. https://github.com/apache/pulsar-client-node/blob/master/src/Producer.cc#L89-L120

We used AsyncWorker because segmentation fault about NAPI objects occurred in callback registered with C async function.
FYI: nodejs/node-addon-api#457

The throughput of asynchronous processing using NAPI::AsyncWorker is lower than that using C async function(e.g. pulsar_client_create_producer_async).

Therefore, we want to use C async function in order to make performance better.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions