使用 AMQP RabbitMQ 进行 Spring Batch

发布于 2024-12-18 12:08:45 字数 317 浏览 2 评论 0原文

我想使用 String Batch 从 RabbitMQ / AMQP 获取数据。 我想加载 100 条消息(或者如果 100 条没有出现,则表示超时后出现的消息数),然后将其放入列表中。 我有一个 RabbitMQ 正在运行,我只想从其中获取每 100 个包中的数据并将其集中到列表中。

我读过有关 Spring Batch 的内容,我发现它可以使用 org.springframework.batch.item.file.FlatFileItemReader 从文件(例如 CSV)中读取。 但我不知道如何从兔子队列中读取?或者说有可能吗?

亲切的问候,

拉法尔

I'd like to use String Batch to get the data from RabbitMQ / AMQP.
I want to load 100 messages (or if 100 doesn't come, the number of messsages camed after some timeout) and then put it into the list.
I have a RabbitMQ working, i'd just like to get the data from it in packages per 100 and concentrate it to the list.

I have read about Spring Batch, i found that this can read from files (ex. CSV) using org.springframework.batch.item.file.FlatFileItemReader.
But I dont know how to read from a Rabbit Queue? Or is it even possible?

Kind Regards,

Rafał

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文