(Since version 5.3.7) Use Cluster-based apply
A java friendly interface: we use scala's implicit conversions to feed in a {{java.
A java friendly interface: we use scala's implicit conversions to feed in a {{java.util.Iterator<ReadHandle>}}
(Since version 5.3.7) Use Cluster-based apply
(Since version 5.3.7) Use Cluster-based apply
Read from multiple clients in round-robin fashion, "grabby hands" style. The load balancing is simple, and falls out naturally from the user of the {{Offer}} mechanism: When there are multiple available messages, round-robin across them. Otherwise, wait for the first message to arrive.
Cluster example:
Cluster[SocketAddress] cluster = ... // e.g. ZookeeperServerSetCluster val readHandle = MultiReader(cluster, "the-queue") .clientBuilder( ClientBuilder() .codec(Kestrel()) .requestTimeout(1.minute) .connectTimeout(1.minute) .hostConnectionLimit(1) /* etc... but do not set hosts or build */ .retryBackoffs(/* Stream[Duration], Timer; optional */ .build()