private Map<String, byte[]> readMessagesFromCoordinatorStore() {
    Map<String, byte[]> bootstrappedMessages = new HashMap<>();
    Map<String, byte[]> coordinatorStreamMessages = metadataStore.all();
    coordinatorStreamMessages.forEach((coordinatorMessageKeyAsJson, value) -> {
      CoordinatorMessageKey coordinatorMessageKey = CoordinatorStreamStore.deserializeCoordinatorMessageKeyFromJson(coordinatorMessageKeyAsJson);
      if (Objects.equals(namespace, coordinatorMessageKey.getNamespace())) {
        if (value != null) {
          bootstrappedMessages.put(coordinatorMessageKey.getKey(), value);
        } else {
          bootstrappedMessages.remove(coordinatorMessageKey.getKey());
        }
      }
    });

    return bootstrappedMessages;
  }
Reads and returns all the messages from coordinator stream for a particular namespace.
samza-core/src/main/java/org/apache/samza/coordinator/metadatastore/NamespaceAwareCoordinatorStreamStore.java