lrhkobe opened a new issue #488:
URL: https://github.com/apache/incubator-eventmesh/issues/488
## Feature Request
### Is your feature request related to a problem? Please describe
The client randomly selects eventmesh from the address list to establish a
connection. As to the client with same group , they may connect the same
eventmesh, or the distribution of clients will be hugely uneven.Therefore, it
may lead unbalanced flow on eventmesh.
### Describe the solution you'd like
1. Add `eventmesh-registry-plugin` module refers to
`eventmesh-connector-plugin`, `eventmesh-registry-plugin` contains registry api
design module and concrete registry plugin implementation module;
2. I will provide a simple API interface design in `eventmesh-registry-api`
module , support rebalance among clients with same group, and recommend
eventmesh before connecting in the `eventmesh-runtime` by calling the API
interface.
3. In order to avoid eventmesh running error , I provide a
plugin(`eventmesh-registry-namesrv`) of the default empty implementation of the
`eventmesh-registry-api`, as to this plugin implemention, you can consider your
own requirements.If you are interested in this issue, welcome to participate
and suggestions.
Firstly, Every eventmesh will report the distribution data of clients to
registry periodly;
Then registry can know the distribution data of clients with same group in
different eventmesh.
At last, Eventmesh can do rebalance by the distribution data from registry
and recommend eventmesh to client when connect.
### API interface design in eventmesh-registry-api
```
@EventMeshSPI(isSingleton = true)
public interface RegistryService {
void init() throws RegistryException;
void start() throws RegistryException;
void shutdown() throws RegistryException;
List<EventMeshDataInfo> findEventMeshInfoByCluster(String clusterName)
throws RegistryException;
Map<String/*eventMeshName*/, Map<String/*purpose*/, Integer/*num*/>>
findEventMeshClientDistributionData(String clusterName, String group, String
purpose) throws RegistryException;
boolean register(EventMeshRegisterInfo eventMeshRegisterInfo) throws
RegistryException;
boolean unRegister(EventMeshUnRegisterInfo eventMeshUnRegisterInfo)
throws RegistryException;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]