diff --git a/eventmesh-meta/eventmesh-meta-etcd/src/main/java/org/apache/eventmesh/meta/etcd/service/EtcdCustomService.java b/eventmesh-meta/eventmesh-meta-etcd/src/main/java/org/apache/eventmesh/meta/etcd/service/EtcdCustomService.java index 23ca9985bc..11460cc684 100644 --- a/eventmesh-meta/eventmesh-meta-etcd/src/main/java/org/apache/eventmesh/meta/etcd/service/EtcdCustomService.java +++ b/eventmesh-meta/eventmesh-meta-etcd/src/main/java/org/apache/eventmesh/meta/etcd/service/EtcdCustomService.java @@ -66,6 +66,9 @@ public List findEventMeshServicePubTopicInfos() th } return eventMeshServicePubTopicInfoList; } + } catch (InterruptedException e) { + log.error("[EtcdRegistryService][findEventMeshServicePubTopicInfos] InterruptedException", e); + Thread.currentThread().interrupt(); } catch (Exception e) { log.error("[EtcdRegistryService][findEventMeshServicePubTopicInfos] error", e); throw new MetaException(e.getMessage()); @@ -84,12 +87,13 @@ public EventMeshAppSubTopicInfo findEventMeshAppSubTopicInfoByGroup(String group GetOption getOption = GetOption.newBuilder().withPrefix(keyByteSequence).build(); keyValues = client.getKVClient().get(keyByteSequence, getOption).get().getKvs(); if (CollectionUtils.isNotEmpty(keyValues)) { - EventMeshAppSubTopicInfo eventMeshAppSubTopicInfo = - JsonUtils.parseObject( - new String(keyValues.get(0).getValue().getBytes(), Constants.DEFAULT_CHARSET), - EventMeshAppSubTopicInfo.class); - return eventMeshAppSubTopicInfo; + return JsonUtils.parseObject( + new String(keyValues.get(0).getValue().getBytes(), Constants.DEFAULT_CHARSET), + EventMeshAppSubTopicInfo.class); } + } catch (InterruptedException e) { + log.error("[EtcdRegistryService][findEventMeshAppSubTopicInfoByGroup] InterruptedException", e); + Thread.currentThread().interrupt(); } catch (Exception e) { log.error("[EtcdRegistryService][findEventMeshAppSubTopicInfoByGroup] error, group: {}", group, e); throw new MetaException(e.getMessage());