use of org.apache.eventmesh.runtime.core.protocol.grpc.service.ConsumerService in project incubator-eventmesh by apache.
the class EventMeshGrpcServer method init.
public void init() throws Exception {
logger.info("==================EventMeshGRPCServer Initializing==================");
initThreadPool();
initHttpClientPool();
msgRateLimiter = RateLimiter.create(eventMeshGrpcConfiguration.eventMeshMsgReqNumPerSecond);
producerManager = new ProducerManager(this);
producerManager.init();
consumerManager = new ConsumerManager(this);
consumerManager.init();
grpcRetryer = new GrpcRetryer(this);
grpcRetryer.init();
int serverPort = eventMeshGrpcConfiguration.grpcServerPort;
server = ServerBuilder.forPort(serverPort).addService(new ProducerService(this, sendMsgExecutor)).addService(new ConsumerService(this, clientMgmtExecutor, replyMsgExecutor)).addService(new HeartbeatService(this, clientMgmtExecutor)).build();
logger.info("GRPCServer[port={}] started", serverPort);
logger.info("-----------------EventMeshGRPCServer initialized");
}
Aggregations