code: public synchronized Set<String> regexInTopic(final String topic, final String payload) {
      final Set<String> res = new HashSet<>();
      final Map<String, List<KafkaDependencyInstanceContext>> eventMap = this.topicEventMap.get(topic);
      if (eventMap == null) {
        return Collections.emptySet();
      }
  
      for (final Map.Entry<String, List<KafkaDependencyInstanceContext>> entry : eventMap.entrySet()) {
        final RegexKafkaDependencyMatcher matcher = new RegexKafkaDependencyMatcher(Pattern.compile(entry.getKey()));
        if (matcher.isMatch(payload)) {
          res.add(entry.getKey());
        }
      }
      return res;
    }
docs: Return a set of pattern that matches with the payload.
  @param payload and topic
  @return regexs that meet the customized requirement