datacratic/soa — pull request #119 by RAttab (2014-08-07 21:10:08+00:00)
Title: Zmq sharding

Sharding of a ZMQ service can be done by registering a given service as a given shard via the ServiceBase::registerShardedServiceProvider(). An event can be sent to a given shard using the ZmqMultipleNamedBusProxyClientFactoryBean::sendMessageToShard.

The implementation is rather simple, the shard number is stuffed in the serviceClass/serviceName json blob which is then recovered by the proxy endpoint when connecting. On send to a given shard, we simply scan the list of endpoints for the correct shard and send it if present.