From c32523b97b1e20ea1be0beb62fd587aa61f10de8 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Thu, 24 Aug 2023 00:10:40 +0800 Subject: [PATCH] fix: should drop message when no any handler (#30) --- src/server/GRPCServerImpl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/GRPCServerImpl.ts b/src/server/GRPCServerImpl.ts index 0096bf9..939e8c4 100644 --- a/src/server/GRPCServerImpl.ts +++ b/src/server/GRPCServerImpl.ts @@ -109,9 +109,9 @@ export default class GRPCServerImpl implements IAppCallbackServer { }; const handler = this.findPubSubHandler(pubsubName, topic, metadata); if (!handler) { - this.logger.warn('[layotto:server:grpc:onTopicEvent:warn] can\'t find the pubsub(%s) topic(%s) id(%s) handler, let server retry', + this.logger.warn('[layotto:server:grpc:onTopicEvent:warn] can\'t find the pubsub(%s) topic(%s) id(%s) handler, drop it', pubsubName, topic, request.id); - res.setStatus(TopicEventResponse.TopicEventResponseStatus.RETRY); + res.setStatus(TopicEventResponse.TopicEventResponseStatus.DROP); return callback(null, res); } try {