February 2018
Intermediate to advanced
552 pages
13h 46m
English
In the Akka Streams API, MergeHub acts as a Source of elements. We can attach this Hub into only one Sink or single Consumer. This means that we can materialize this Hub value into a Sink, which inturn can be materialized any number of times.
MergeHub allows us to implement a Dynamic Fan-In junction point in a Graph, where elements coming from different Producers are emitted in a first-come-first-served fashion:

As shown in the preceding diagram, we can attach any number of producers to a MergeHub component; however, we can connect this Hub to a single consumer only.
Read now
Unlock full access