Search in sources :

Example 1 with GrpcRetryer

use of org.apache.eventmesh.runtime.core.protocol.grpc.retry.GrpcRetryer 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");
}
Also used : GrpcRetryer(org.apache.eventmesh.runtime.core.protocol.grpc.retry.GrpcRetryer) ConsumerService(org.apache.eventmesh.runtime.core.protocol.grpc.service.ConsumerService) ConsumerManager(org.apache.eventmesh.runtime.core.protocol.grpc.consumer.ConsumerManager) ProducerService(org.apache.eventmesh.runtime.core.protocol.grpc.service.ProducerService) ProducerManager(org.apache.eventmesh.runtime.core.protocol.grpc.producer.ProducerManager) HeartbeatService(org.apache.eventmesh.runtime.core.protocol.grpc.service.HeartbeatService)

Aggregations

ConsumerManager (org.apache.eventmesh.runtime.core.protocol.grpc.consumer.ConsumerManager)1 ProducerManager (org.apache.eventmesh.runtime.core.protocol.grpc.producer.ProducerManager)1 GrpcRetryer (org.apache.eventmesh.runtime.core.protocol.grpc.retry.GrpcRetryer)1 ConsumerService (org.apache.eventmesh.runtime.core.protocol.grpc.service.ConsumerService)1 HeartbeatService (org.apache.eventmesh.runtime.core.protocol.grpc.service.HeartbeatService)1 ProducerService (org.apache.eventmesh.runtime.core.protocol.grpc.service.ProducerService)1