akka/akka-core

Streams to ClusterSharding Sink

Open

#21,630 创建于 2016年10月6日

在 GitHub 查看
 (6 评论) (6 反应) (0 负责人)Scala (3,547 fork)batch import
1 - triagedhelp wantedt:cluster-shardingt:cluster-toolst:stream

仓库指标

Star
 (13,277 star)
PR 合并指标
 (平均合并 8天 19小时) (30 天内合并 10 个 PR)

描述

I have a need at the moment to take streaming data and pump it into a cluster that utilizes cluster sharding. There is a sinkWithActorRef available, but there are some inefficiencies with putting an Actor between the streams and the ClusterShardingRegion. For example, one aspect that I would really love is the ability of the stream to backpressure in response to the local ShardRegions message buffers filling, or better yet, if backpressure is communicated(from remote ShardRegions or local Shards). It is certainly possible to do this with a separate actor, but some of the information that actor would have to request anyways from the ShardRegion(maybe cluster membership status) and some I don't have access to at all(such as the state of message buffers, or the fact Shards are being handed off). It would be super convenient if there was a sinkWithClusterSharding or something like that which would handle some of this logic for me, potentially backpressuring on handoff changes, or with remember entities on, during the recovery state.

贡献者指南