public static String getNamespaceFromResource(String resource) {
        if (StringUtils.isEmpty(resource) || isSystemResource(resource)) {
            return STRING_BLANK;
        }
        String resourceWithoutRetryAndDLQ = withOutRetryAndDLQ(resource);
        int index = resourceWithoutRetryAndDLQ.indexOf(NAMESPACE_SEPARATOR);

        return index > 0 ? resourceWithoutRetryAndDLQ.substring(0, index) : STRING_BLANK;
    }
@Test
    public void testGetNamespaceFromResource() {
        String namespaceExpectBlank = NamespaceUtil.getNamespaceFromResource(TOPIC);
        Assert.assertEquals(namespaceExpectBlank, NamespaceUtil.STRING_BLANK);
        String namespace =  NamespaceUtil.getNamespaceFromResource(TOPIC_WITH_NAMESPACE);
        Assert.assertEquals(namespace, INSTANCE_ID);
        String namespaceFromRetryTopic = NamespaceUtil.getNamespaceFromResource(RETRY_TOPIC_WITH_NAMESPACE);
        Assert.assertEquals(namespaceFromRetryTopic, INSTANCE_ID);
    }