Spring集成Kafka的MessageChannel线程?

huangapple go评论142阅读模式
英文:

Spring integration Kafka MessaheChannel Thread?

问题

我有一个 Spring Integration 流程 bean(通过 Java DSL 配置),它处理来自与 Spring CloudStream 绑定的 Kafka 队列消息通道的消息。

Kafka 消息的来源是外部应用程序,因此我真正想了解的是,哪个线程/线程将实际处理这些消息。

这是一个应用程序创建的单个专用线程,还是 CloudStream 自动创建和配置的线程池,或者是其他什么方式?

我能以某种方式对其进行管理吗?

英文:

I have an Spring Integration flow bean (configured via Java DSL) which processes the messages from kafka queue message channel binded with Spring CloudStream.

The source of kafka message is an external application so what I really want to understand, is what thread/threads will actually process that messages.

Is it a single dedicated thread created with application, or is there a thread pool created and configured automatically by CloudStream, or something else?

And could I manage it somehow?

答案1

得分: 1

代码部分不要翻译。

英文:

The kafka message channel binder uses one thread by default; if you increase the binding consumer.concurrency property, you will get that number of threads - you need at least as many partitions as the concurrency setting because a partition can only be consumed by one consumer.

huangapple
  • 本文由 发表于 2020年7月23日 12:22:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/63046878.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定