简体   繁体   English

将文件传输到消息代理

[英]Transferring files to a message broker

We are setting up a database with a front end program that parses csv files and dumps them into the DB. 我们正在使用一个前端程序来建立数据库,该程序可以解析csv文件并将其转储到DB中。 Files are coming from many locations at the same time and need to be persisted if anything goes wrong. 文件同时来自多个位置,如果出现任何问题,则需要保留这些文件。

Is a message broker like rabbitmq a good application for this? 像Rabbitmq这样的消息代理是否是一个很好的应用程序? I need a queue of some sort that can be read from the back end. 我需要可以从后端读​​取的某种队列。

Is a message broker like rabbitmq a good application for this? 像Rabbitmq这样的消息代理是否是一个很好的应用程序?

Yes, but I wouldn't recommend you to send large files to RabbitMQ especially if you'd like to use persistent messages. 是的,但是我不建议您将大文件发送到RabbitMQ,特别是如果您要使用持久性消息。 If this is the case, I'd save a file to a storage (cloud, cache, etc) and send its name/path in a message. 如果是这种情况,我会将文件保存到存储(云,缓存等)中,并在消息中发送其名称/路径。 A worker process would pick up a message, then download a file, parse it and save its contents to database. 辅助进程将接收一条消息,然后下载文件,对其进行解析并将其内容保存到数据库中。 This way you can distribute files among worker processes and reduce load on broker. 这样,您可以在辅助进程之间分发文件并减少代理的负载。 It would allow you to scale easily. 它可以让您轻松扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 消息队列和消息代理的区别 - Message queue and Message broker differences 消息代理是否适合简单的消息发送方和接收方? - Is a message broker appropriate for a simple message sender and receiver? 适用于蜂窝连接的消息协议/代理? - Message protocol / broker that is suitable for cellular connections? 使用mqtt协议和kafka作为消息代理 - using mqtt protocol with kafka as a message broker WebSphere Message Broker和WebSphere MQ之间有什么区别? - What difference between a WebSphere Message Broker and WebSphere MQ? 我可以在微服务架构中使用 BizTalk 作为消息代理吗? - Can I use BizTalk as Message Broker in a Microservices architrecture? 如何最好地将 Apache Kafka 定位为许多孤立客户端的消息代理 - How to best position Apache Kafka to be a message broker for many isolated clients 如何使用Message Broker和数据库设计分布式应用程序? - How to design a distributed application using a Message Broker and a Database? 什么时候使用 websockets 比使用消息代理(如 Kafka)更好? - When is it better to use websockets versus a message broker such as Kafka? IBM MQ vs Apache Kafka作为事件驱动架构和微服务架构的消息代理/引擎 - IBM MQ vs Apache Kafka as a message broker/engine for Event Driven Architecture and Microservices Architecture
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM