Skip to content

Rabbitmq点赞改为阻塞式消费 #104

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EvenTiming
Copy link
Contributor

在原本的逻辑中,每10秒会从连接池中获取一个连接,然后新建channel执行一次消费后销毁。
本次pr将其更改为阻塞式获取,获取一个连接后作为专用的消费连接。经过
rabbitmqConsumerChannel.basicConsume(queueName, false, consumer);
方法后便可以以阻塞方式进行消费。channel和连接会在程序终止的时候关闭归还。
经过测试,能够正常工作。
image

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

Successfully merging this pull request may close these issues.

1 participant