ilaipi opened a new issue #135:
URL: https://github.com/apache/pulsar-client-node/issues/135


   client version: 1.2.0
   
   OS: wsl2 ubuntu
   
   
   ```
   // producer:
   send() {
       const producer = await this.pulsar.createProducer({
         topic: 'my-topic',
       });
       await producer.send({
         data: Buffer.from(`Hello, pulsar, ${Date.now()}`),
       });
   
       await producer.send({
         data: Buffer.from(`Hello, pulsar, delayed, ${Date.now()}`),
         deliverAfter: 30000,
         // deliverAt: new Date().getTime() + 50000,
       });
       await producer.close();
   }
   
   // consumer
       await this.pulsar.subscribe({
         topic: 'my-topic',
         subscription: 'my-subscription',
         subscriptionType: 'Shared',
         listener: (msg, msgConsumer) => {
           console.log(msg.getData().toString());
           msgConsumer.acknowledge(msg);
         },
       });
   ```
   
   when I call send(), the consumer console print 
   ```
   Hello, pulsar, 1607572676764
   Hello, pulsar, delayed, 1607572676776
    ```
   immediately.
   
   
   Is this right?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to