diff --git a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/config/EiffelConfig.java b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/config/EiffelConfig.java
index dfd8f9d..5224a50 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/config/EiffelConfig.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/config/EiffelConfig.java
@@ -14,14 +14,17 @@
 
 package com.googlesource.gerrit.plugins.eventseiffel.config;
 
+import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.extensions.annotations.PluginName;
 import com.google.gerrit.server.config.PluginConfigFactory;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
+import java.util.Optional;
 import org.eclipse.jgit.lib.Config;
 
 @Singleton
 public class EiffelConfig {
+  private static final FluentLogger logger = FluentLogger.forEnclosingClass();
 
   public static class Provider implements com.google.inject.Provider<EiffelConfig> {
     private static final String EIFFELEVENT = "EiffelEvent";
@@ -40,13 +43,19 @@
     }
   }
 
-  private final String nameSpace;
+  private final Optional<String> nameSpace;
 
   public EiffelConfig(String nameSpace) {
-    this.nameSpace = nameSpace;
+    if (nameSpace == null) {
+      this.nameSpace = Optional.empty();
+      logger.atInfo().log("namespace is not set in the config");
+    } else {
+      this.nameSpace = Optional.of(nameSpace);
+      logger.atInfo().log("namespace is set to: %d", nameSpace);
+    }
   }
 
-  public String nameSpace() {
+  public Optional<String> nameSpace() {
     return nameSpace;
   }
 }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/mapping/EiffelEventFactory.java b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/mapping/EiffelEventFactory.java
index 07522fd..dc7eb92 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/mapping/EiffelEventFactory.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/mapping/EiffelEventFactory.java
@@ -42,6 +42,7 @@
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
 import java.util.List;
+import java.util.Optional;
 import java.util.UUID;
 
 public class EiffelEventFactory {
@@ -61,7 +62,7 @@
     private final String webUrl;
     private final String pluginName;
     private final String sshAddress;
-    private final String nameSpace;
+    private final Optional<String> nameSpace;
 
     @Inject
     public Provider(
@@ -105,7 +106,7 @@
       String pluginVersion,
       String webUrl,
       String configuredSshAddress,
-      String nameSpace) {
+      Optional<String> nameSpace) {
     StringBuilder purl = new StringBuilder(PURL_BASE + pluginName);
     if (pluginVersion != null) {
       purl.append("@" + pluginVersion);
@@ -113,7 +114,7 @@
     this.packageUrl = purl.toString();
     this.host = URI.create(webUrl).getHost();
     this.pluginName = pluginName;
-    this.nameSpace = nameSpace;
+    this.nameSpace = nameSpace.orElse(host);
 
     StringBuilder commitEndpoint = new StringBuilder();
     commitEndpoint.append(webUrl);
@@ -132,7 +133,7 @@
     }
     cloneUrl.append("%s");
     projectCloneUrl = cloneUrl.toString();
-    tagPURLTemplate = "pkg:generic/" + nameSpace + "/%s@%s?vcs_url=git%%2B%s%%40%s";
+    tagPURLTemplate = "pkg:generic/" + this.nameSpace + "/%s@%s?vcs_url=git%%2B%s%%40%s";
   }
 
   private String parseSshAddress(String webUrl, String configuredSshAddress) {
diff --git a/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/EiffelEventsTest.java b/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/EiffelEventsTest.java
index ce326f4..c847bb0 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/EiffelEventsTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/EiffelEventsTest.java
@@ -24,7 +24,6 @@
 import com.google.gerrit.entities.RefNames;
 import com.google.gerrit.extensions.api.projects.TagInput;
 import com.google.inject.Provider;
-import com.googlesource.gerrit.plugins.eventseiffel.config.EiffelConfig;
 import com.googlesource.gerrit.plugins.eventseiffel.eiffel.EventKey;
 import com.googlesource.gerrit.plugins.eventseiffel.eiffel.SourceChangeEventKey;
 import com.googlesource.gerrit.plugins.eventseiffel.eiffel.api.EventStorageException;
@@ -189,15 +188,8 @@
 
     @Override
     public EiffelEventFactory get() {
-      return new EiffelEventFactory(PLUGIN_NAME, VERSION, WEB_URL, "*:" + SSH_PORT, NAMESPACE);
-    }
-  }
-
-  public static class TestEiffelConfigProvider implements Provider<EiffelConfig> {
-
-    @Override
-    public EiffelConfig get() {
-      return new EiffelConfig(NAMESPACE);
+      return new EiffelEventFactory(
+          PLUGIN_NAME, VERSION, WEB_URL, "*:" + SSH_PORT, Optional.of(NAMESPACE));
     }
   }
 }
diff --git a/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/listeners/GerritEventListenersIT.java b/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/listeners/GerritEventListenersIT.java
index ab53d14..126eb50 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/listeners/GerritEventListenersIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/listeners/GerritEventListenersIT.java
@@ -320,9 +320,7 @@
       bind(EventListenersConfig.class).toProvider(TestEventListenerConfigProvider.class);
       DynamicSet.bind(binder(), RevisionCreatedListener.class).to(PatchsetCreatedListener.class);
       DynamicSet.bind(binder(), GitReferenceUpdatedListener.class).to(RefUpdateListener.class);
-      bind(EiffelConfig.class)
-          .toProvider(EiffelEventsTest.TestEiffelConfigProvider.class)
-          .in(Scopes.SINGLETON);
+      bind(EiffelConfig.class).toProvider(EiffelConfig.Provider.class).in(Scopes.SINGLETON);
     }
   }
 }
diff --git a/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/EiffelEventParserIT.java b/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/EiffelEventParserIT.java
index 2941b38..4fcdb78 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/EiffelEventParserIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/eventseiffel/parsing/EiffelEventParserIT.java
@@ -20,6 +20,8 @@
 
 import com.google.gerrit.acceptance.PushOneCommit;
 import com.google.gerrit.acceptance.TestPlugin;
+import com.google.gerrit.acceptance.UseLocalDisk;
+import com.google.gerrit.acceptance.config.GlobalPluginConfig;
 import com.google.gerrit.extensions.common.AccountInfo;
 import com.google.inject.AbstractModule;
 import com.google.inject.Scopes;
@@ -40,6 +42,8 @@
 import com.googlesource.gerrit.plugins.eventseiffel.eiffel.dto.EiffelSourceChangeSubmittedEventInfo;
 import com.googlesource.gerrit.plugins.eventseiffel.mapping.EiffelEventFactory;
 import com.googlesource.gerrit.plugins.eventseiffel.mapping.EiffelEventMapper;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
 import java.time.Instant;
 import org.eclipse.jgit.lib.Constants;
 import org.eclipse.jgit.revwalk.RevCommit;
@@ -266,14 +270,25 @@
     assertEquals(0, TestEventHub.EVENTS.size());
   }
 
+  @Test
+  @UseLocalDisk
+  @GlobalPluginConfig(pluginName = PLUGIN_NAME, name = "EiffelEvent.namespace", value = NAMESPACE)
+  public void artcQueuedscsHandledWithCustomNameSpace() throws Exception {
+    assertArtcQueuedScsHandled(false, NAMESPACE);
+  }
+
   private void assertArtcQueuedScsHandled(boolean annotated) throws Exception {
+    assertArtcQueuedScsHandled(annotated, "localhost");
+  }
+
+  private void assertArtcQueuedScsHandled(boolean annotated, String nameSpace) throws Exception {
     setScsHandled();
     String ref =
         createTagRef(getHead(repo(), "HEAD").getName(), annotated)
             .substring(Constants.R_TAGS.length());
-    ArtifactEventKey artc = ArtifactEventKey.create(tagPURL(project.get(), ref));
+    ArtifactEventKey artc = ArtifactEventKey.create(tagPURL(project.get(), ref, nameSpace));
     CompositionDefinedEventKey cd =
-        CompositionDefinedEventKey.create(tagCompositionName(project.get()), ref);
+        CompositionDefinedEventKey.create(tagCompositionName(project.get(), nameSpace), ref);
 
     eventParser.createAndScheduleArtc(project.get(), ref, EPOCH_MILLIS, false);
     assertEquals(2, TestEventHub.EVENTS.size());
@@ -298,10 +313,22 @@
     assertEquals(expected, actual);
   }
 
+  protected static String tagCompositionName(String projectName) {
+    return tagCompositionName(projectName, "localhost");
+  }
+
+  protected static String tagCompositionName(String projectName, String nameSpace) {
+    return "scmtag/git/" + nameSpace + "/" + URLEncoder.encode(projectName, StandardCharsets.UTF_8);
+  }
+
   protected static String tagPURL(String projectName, String tagName) {
+    return tagPURL(projectName, tagName, "localhost");
+  }
+
+  protected static String tagPURL(String projectName, String tagName, String nameSpace) {
     return String.format(
         TAG_PURL_TEMPLATE,
-        NAMESPACE,
+        nameSpace,
         projectName,
         tagName,
         String.format("ssh://%s/%s", HOST_NAME, projectName),
@@ -318,9 +345,7 @@
       bind(EventMappingConfig.class).toProvider(EventMappingConfig.Provider.class);
       bind(EiffelEventMapper.class);
       bind(EiffelEventParser.class);
-      bind(EiffelConfig.class)
-          .toProvider(EiffelEventsTest.TestEiffelConfigProvider.class)
-          .in(Scopes.SINGLETON);
+      bind(EiffelConfig.class).toProvider(EiffelConfig.Provider.class).in(Scopes.SINGLETON);
       bind(EiffelEventFactory.class)
           .toProvider(EiffelEventFactory.Provider.class)
           .in(Scopes.SINGLETON);
