ayeo-flex-org / pulsar-flex

Pulsar Flex is a modern Apache Pulsar client for Node.js, developed to be independent of C++.
MIT License
45 stars 9 forks source link

Add Subscription to Sample Code #86

Closed k2la closed 2 years ago

k2la commented 2 years ago

Motivation

When the sample code in README is executed, the following logs are output on the client and server.

Client:

PulsarFlexResponseTimeoutError: Timeout waiting for response for request id: 0 from the Broker

Server:

2022-09-07T10:44:06,378+0900 [pulsar-io-18-2] WARN  org.apache.pulsar.broker.service.ServerCnx - [/127.0.0.1:62247] Got exception java.lang.IllegalStateException: Some required fields are missing
    at org.apache.pulsar.common.api.proto.CommandSubscribe.checkRequiredFields(CommandSubscribe.java:922)

It appears that this is due to the fact that "subscription" is not specified when creating Consumer.

Modification

Add "subscription" explicitly.

danielsinai commented 2 years ago

Thanks for your contribution! @k2la