流处理和消息处理之间的区别 [英] Difference between stream processing and message processing

查看:519
本文介绍了流处理和消息处理之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

流处理和传统消息处理之间的基本区别是什么?正如人们所说的,kafka是流处理的不错选择,但从本质上来说,kafka是类似于ActivMQ,RabbitMQ等的消息传递框架.

What is the basic difference between stream processing and traditional message processing? As people say that kafka is good choice for stream processing but essentially kafka is a messaging framework similar to ActivMQ, RabbitMQ etc.

为什么我们通常不说ActiveMQ同样适用于流处理.

Why do we generally not say that ActiveMQ is good for stream processing as well.

使用者消耗消息的速度是否确定它是否为流?

Is it the speed at which messages are consumed by the consumer determines if it is a stream?

推荐答案

在传统的消息处理中,您对消息应用简单的计算-在大多数情况下,每条消息都是单独进行的.

In traditional message processing, you apply simple computations on the messages -- in most cases individually per message.

在流处理中,您将复杂的操作同时应用于多个输入流和多个记录(即消息)(例如聚合和联接).

In stream processing, you apply complex operations on multiple input streams and multiple records (ie, messages) at the same time (like aggregations and joins).

此外,传统的消息传递系统无法及时返回"-即在将消息传递给所有订阅的使用者之后自动删除消息.相反,Kafka在使用基于拉取的模型(即,消费者从Kafka中拉出数据)的过程中保留消息的时间可配置.这使使用者可以回滚"并多次消费消息-或如果您添加新的使用者,它可以读取完整的历史记录.这使流处理成为可能,因为它允许更复杂的应用程序.此外,流处理并不一定要涉及实时处理,而是要处理无限输入流(与应用于有限输入的批处理相反).

Furthermore, traditional messaging system cannot go "back in time" -- ie, the automatically delete messages after they got delivered to all subscribed consumers. In contrast, Kafka keeps the messages as it uses a pull based model (ie, consumer pull data out of Kafka) for a configurable amount of time. This allows consumers to "rewind" and consume messages multiple times -- or if you add a new consumer, it can read the complete history. This makes stream processing possible, because it allows for more complex applications. Furthermore, stream processing is not necessarily about real-time processing -- it's about processing infinite input stream (in contrast to batch processing that is applied to finite inputs).

Kafka提供了Kafka Connect和Streams API-因此,它是一个流处理平台,而不仅仅是消息传递/发布-订阅系统(即使它在其核心中使用了它).

And Kafka offers Kafka Connect and Streams API -- so it is a stream processing platform and not just a messaging/pub-sub system (even if it uses this in it's core).

这篇关于流处理和消息处理之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆