Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send delayed message, but consume immediately #345

Open
immatt2015 opened this issue Oct 19, 2023 · 3 comments
Open

send delayed message, but consume immediately #345

immatt2015 opened this issue Oct 19, 2023 · 3 comments

Comments

@immatt2015
Copy link

pulsar-server 3.0.1
pulsar-client 1.9.0
node v19.6.0

I cannot send delayed messages.

            producer.send({
                data: Buffer.from(JSON.stringify(Date.now())),
                deliverAfter: 30000
            });

Is there some thing wrong?

@shibd
Copy link
Member

shibd commented Oct 19, 2023

Can you check your broker configuration?

https://pulsar.apache.org/docs/3.1.x/concepts-messaging/#broker

@immatt2015
Copy link
Author

immatt2015 commented Oct 20, 2023

Delayed message delivery is enabled.

delayedDeliveryEnabled=true
delayedDeliveryTrackerFactoryClassName=org.apache.pulsar.broker.delayed.InMemoryDelayedDeliveryTrackerFactory
delayedDeliveryTickTimeMillis=1000

I think broker configs is ok.

Golang client works.

@shibd
Copy link
Member

shibd commented Oct 30, 2023

https://github.com/shibd/pulsar-node-delayed-test

You can refer to this repository for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants