Read from multiple clients in round-robin fashion, "grabby hands"
style using Kestrel's memcache protocol. 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.
Var[Addr] example:
val name: com.twitter.finagle.Name = Resolver.eval(...)
val va: Var[Addr] = name.bind()
val readHandle =
MultiReaderMemcache(va, "the-queue")
.clientBuilder(
ClientBuilder()
.codec(MultiReaderMemcache.codec)
.requestTimeout(1.minute)
.connectTimeout(1.minute)
.hostConnectionLimit(1) /* etc... but do not set hosts or build */
.retryBackoffs(/* Stream[Duration], Timer; optional */
.build()
Read from multiple clients in round-robin fashion, "grabby hands" style using Kestrel's memcache protocol. 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.
Var[Addr] example: