diff --git a/CHANGELOG.md b/CHANGELOG.md
index daf87170..3858b5e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+## 2.1.0
+- Implemented new routing key template for Sepia.
+-
## 2.0.30
- Upgrading to OpenJDK 17
diff --git a/pom.xml b/pom.xml
index edb95214..83d2f9c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,8 +9,8 @@
2.0.12
- 2.0.30
- 2.2.6
+ 2.1.0
+ 2.3.0
eiffel-remrem-publish
${eiffel-remrem-publish.version}
diff --git a/publish-cli/src/main/java/com/ericsson/eiffel/remrem/publish/cli/CliOptions.java b/publish-cli/src/main/java/com/ericsson/eiffel/remrem/publish/cli/CliOptions.java
index ca7ca166..547205d5 100644
--- a/publish-cli/src/main/java/com/ericsson/eiffel/remrem/publish/cli/CliOptions.java
+++ b/publish-cli/src/main/java/com/ericsson/eiffel/remrem/publish/cli/CliOptions.java
@@ -33,7 +33,7 @@ public class CliOptions {
static private Options options=null;
static private CommandLine commandLine;
-
+ private static final String SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH = "semanticsRoutingKeyTypeOverrideFilepath";
//Used for testing purposes
private static ArrayList testErrorCodes = new ArrayList<>();
@@ -85,6 +85,8 @@ public static void createCLIOptions() {
options.addOption("tag", "tag", true, "tag to be used in routing key");
options.addOption("rk", "routing_key", true, "routing key of the eiffel message. When provided routing key is not generated and the value provided is used.");
options.addOption("tto", "tcp_time_out", true, "specifies tcp connection timeout, default time is 60000 milliseconds");
+ options.addOption("srkt", SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH, true, "Default uses the routing key defined in Eiffel Sepia.To make it compatible to prior routing key structure provide the path to routing-key-overrides.properties.");
+
contentGroup = createContentGroup();
options.addOptionGroup(contentGroup);
}
@@ -252,6 +254,12 @@ public static void handleMessageBusOptions() throws HandleMessageBusException {
System.setProperty(key, tls_ver);
}
+ if (commandLine.hasOption(SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH)) {
+ String semanticsRoutingKeyTypeOverrideFilepath =commandLine.getOptionValue(SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH);
+ String key = PropertiesConfig.SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH;
+ System.setProperty(key, semanticsRoutingKeyTypeOverrideFilepath);
+ }
+
String usePersistance = "true";
if (commandLine.hasOption("np")) {
usePersistance = "false";
@@ -288,6 +296,7 @@ public static void clearSystemProperties() {
System.clearProperty(PropertiesConfig.CHANNELS_COUNT);
System.clearProperty(PropertiesConfig.TCP_TIMEOUT);
System.clearProperty(PropertiesConfig.WAIT_FOR_CONFIRMS_TIME_OUT);
+ System.clearProperty(PropertiesConfig.SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH);
}
/**
diff --git a/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/config/PropertiesConfig.java b/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/config/PropertiesConfig.java
index 2d9873c1..2d4de4da 100644
--- a/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/config/PropertiesConfig.java
+++ b/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/config/PropertiesConfig.java
@@ -42,6 +42,7 @@ public class PropertiesConfig {
public static final String SERVICE_UNAVAILABLE = "Service Unavailable";
public static final String CREATE_EXCHANGE_IF_NOT_EXISTING = "com.ericsson.eiffel.remrem.publish.messagebus.createExchange";
+ public static final String SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH = "com.ericsson.eiffel.remrem.publish.messagebus.semanticsRoutingKeyTypeOverrideFilepath";
public static final String INVALID_EXCHANGE = "Exchange not found, Please check exchange configuration and try again";
public static final String INVALID_EXCHANGE_MESSAGE_CLI = " Unavailable. To create the exchange specify -ce or --create_exchange to true )";
public static final String INVALID_EXCHANGE_MESSAGE_SERVICE = " ExchangeName is not present, To create the exchange specify createExchangeIfNotExisting in application configuration";
diff --git a/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/config/RabbitMqPropertiesConfig.java b/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/config/RabbitMqPropertiesConfig.java
index a51dbf56..c2c06229 100644
--- a/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/config/RabbitMqPropertiesConfig.java
+++ b/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/config/RabbitMqPropertiesConfig.java
@@ -54,6 +54,9 @@ public class RabbitMqPropertiesConfig {
@Value("${jasypt.encryptor.jasyptKeyFilePath:#{null}}")
private String jasyptKeyFilePath;
+ @Value("${semanticsRoutingKeyTypeOverrideFilepath:#{null}}")
+ private String semanticsRoutingKeyTypeOverrideFilepath;
+
private Map rabbitMqPropertiesMap = new HashMap();
@Autowired
@@ -154,6 +157,9 @@ private void readSpringProperties() {
rabbitMqProperties.setChannelsCount(
Integer.parseInt(channelsCount));
}
+
+ rabbitMqProperties.setRoutingKeyTypeOverrideFilePath(semanticsRoutingKeyTypeOverrideFilepath);
+
String waitForConfirmsTimeOut = getPropertyAsText(rabbitmqInstanceObject, PROPERTY_WAIT_FOR_CONFIRMS_TIMEOUT);
if (waitForConfirmsTimeOut != null) {
rabbitMqProperties.setWaitForConfirmsTimeOut(Long.parseLong(waitForConfirmsTimeOut));
diff --git a/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/helper/PublishUtils.java b/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/helper/PublishUtils.java
index 72be1a44..ac599f16 100644
--- a/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/helper/PublishUtils.java
+++ b/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/helper/PublishUtils.java
@@ -67,7 +67,16 @@ public static String getRoutingKey(MsgService msgService, JsonObject json, RMQHe
String domainId = rabbitMqProperties.getDomainId();
if (rabbitMqProperties != null && rabbitMqProperties.getExchangeName() != null && rabbitMqProperties.getHost() != null
&& (cliMode || (!cliMode && StringUtils.isNotBlank(domainId)))) {
- return StringUtils.defaultIfBlank(routingKey, msgService.generateRoutingKey(json, tag, domainId, userDomainSuffix));
+
+ if (StringUtils.isNotBlank(routingKey)) {
+ return routingKey;
+ } else if (StringUtils.isNotBlank(rabbitMqProperties.getRoutingKeyTypeOverrideFilePath())) {
+ String type = rabbitMqProperties.getTypeRoutingKeyFromConfiguration(msgService.getEventType(json));
+ if (StringUtils.isNotBlank(type)) {
+ return msgService.generateRoutingKey(json, tag, domainId, userDomainSuffix, type);
+ }
+ }
+ return msgService.generateRoutingKey(json, tag, domainId, userDomainSuffix);
}
return "";
}
diff --git a/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/helper/RabbitMqProperties.java b/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/helper/RabbitMqProperties.java
index f80c7d78..762ca93b 100644
--- a/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/helper/RabbitMqProperties.java
+++ b/publish-common/src/main/java/com/ericsson/eiffel/remrem/publish/helper/RabbitMqProperties.java
@@ -14,14 +14,19 @@
*/
package com.ericsson.eiffel.remrem.publish.helper;
+import java.io.FileInputStream;
import java.io.IOException;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
+import java.util.MissingResourceException;
import java.util.Random;
+import java.util.ResourceBundle;
import java.util.concurrent.TimeoutException;
+import java.util.PropertyResourceBundle;
+import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory;
import com.ericsson.eiffel.remrem.publish.config.PropertiesConfig;
@@ -52,6 +57,7 @@ public class RabbitMqProperties {
private String domainId;
private Integer channelsCount;
private boolean createExchangeIfNotExisting;
+ private String routingKeyTypeOverrideFilePath;
private Integer tcpTimeOut;
private boolean hasExchange = false;
// built in tcp connection timeout value for MB in milliseconds.
@@ -62,12 +68,17 @@ public class RabbitMqProperties {
public static final String CONTENT_TYPE = "application/json";
public static final String ENCODING_TYPE = "UTF-8";
public static final BasicProperties PERSISTENT_BASIC_APPLICATION_JSON;
+ public static final String SEMANTICS_MESSAGE_PROTOCOL = "eiffelsemantics";
private Connection rabbitConnection;
private String protocol;
private List rabbitChannels;
+ private ResourceBundle types;
+ private final String TYPE = "type";
+ private final String DOT = ".";
+
Logger log = (Logger) LoggerFactory.getLogger(RMQHelper.class);
static {
@@ -157,6 +168,14 @@ public void setCreateExchangeIfNotExisting(boolean createExchangeIfNotExisting)
this.createExchangeIfNotExisting = createExchangeIfNotExisting;
}
+ public String getRoutingKeyTypeOverrideFilePath() {
+ return routingKeyTypeOverrideFilePath;
+ }
+
+ public void setRoutingKeyTypeOverrideFilePath(String routingKeyTypeOverrideFilePath) {
+ this.routingKeyTypeOverrideFilePath = routingKeyTypeOverrideFilePath;
+ }
+
public Integer getChannelsCount() {
return channelsCount;
}
@@ -229,9 +248,6 @@ public void init() {
factory.setUsername(username);
factory.setPassword(password);
}
-
-
-
if (tlsVer != null && !tlsVer.isEmpty()) {
if (tlsVer.contains("default")) {
@@ -259,6 +275,14 @@ public void init() {
log.error("Error occured while setting up the RabbitMq Connection. "+e.getMessage());
e.printStackTrace();
}
+
+ if (StringUtils.isNotBlank(routingKeyTypeOverrideFilePath)) {
+ try {
+ types = new PropertyResourceBundle(new FileInputStream(routingKeyTypeOverrideFilePath));
+ } catch (IOException e) {
+ log.error("Cannot find routing key file. "+e.getMessage());
+ }
+ }
}
/**
@@ -337,6 +361,12 @@ private void initService() {
if (waitForConfirmsTimeOut == null ) {
waitForConfirmsTimeOut = Long.getLong(getValuesFromSystemProperties(protocol + ".rabbitmq.waitForConfirmsTimeOut"));
}
+
+ if (protocol.equalsIgnoreCase(SEMANTICS_MESSAGE_PROTOCOL)
+ && (routingKeyTypeOverrideFilePath == null || routingKeyTypeOverrideFilePath.isBlank())) {
+ routingKeyTypeOverrideFilePath = getValuesFromSystemProperties(PropertiesConfig.SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH);
+ }
+
}
@@ -352,6 +382,7 @@ private void setValues() {
usePersitance = Boolean.getBoolean(PropertiesConfig.USE_PERSISTENCE);
createExchangeIfNotExisting = Boolean.parseBoolean(getValuesFromSystemProperties(PropertiesConfig.CREATE_EXCHANGE_IF_NOT_EXISTING));
tcpTimeOut = Integer.getInteger(PropertiesConfig.TCP_TIMEOUT);
+ routingKeyTypeOverrideFilePath = getValuesFromSystemProperties(PropertiesConfig.SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH);
}
private String getValuesFromSystemProperties(String propertyName) {
@@ -556,4 +587,35 @@ private Channel giveMeRandomChannel() throws RemRemPublishException {
factory, e);
}
}
+
+ /**
+ * This method is used to get routing key type based on the eventType from the configuration file
+ *
+ * @param eventType
+ * Eiffel eventType
+ * @return type based on eventType if provided in the configuration file else null
+ */
+ public String getTypeRoutingKeyFromConfiguration(String eventType) {
+
+ if (types != null) {
+ String key = eventType + DOT + TYPE;
+ try {
+ String routingKey = types.getString(key);
+ if (!routingKey.isBlank()) {
+ return routingKey;
+ }else {
+ log.warn("Routing key from configuration is empty for :"+ key);
+ }
+ } catch (MissingResourceException e) {
+ log.warn("Routing key from configuration is null for :"+ key);
+ return null;
+ }
+ }else {
+ log.error("Uninitialized routing key configuration file ");
+ }
+
+ return null;
+ }
+
+
}
diff --git a/publish-service/src/main/resources/application.properties b/publish-service/src/main/resources/application.properties
index 20d6f403..e23c39f0 100644
--- a/publish-service/src/main/resources/application.properties
+++ b/publish-service/src/main/resources/application.properties
@@ -24,6 +24,7 @@ jasypt.encryptor.jasyptKeyFilePath: ""
rabbitmq.instances.jsonlist=[{ "mp": "eiffelsemantics", "host": "127.0.0.1", "port": "5672", "virtualHost": "", "username": "guest", "password": "guest", "tls": "", "exchangeName": "ertest1234", "channelsCount": "1", "domainId": "eiffelxxx", "createExchangeIfNotExisting":true,"waitForConfirmsTimeOut":"5000", "tcpTimeOut": "5000" }, \
{ "mp": "eiffel3", "host": "127.0.0.1", "port": "5672", "virtualHost": "", "username": "guest", "password": "guest", "tls": "", "exchangeName": "eiffel3", "domainId": "eiffelxxx", "channelsCount": "1", "createExchangeIfNotExisting":true,"waitForConfirmsTimeOut":"5000", "tcpTimeOut": "5000" }]
+#semanticsRoutingKeyTypeOverrideFilepath:
# properties for server used to generate messages
generate.server.uri: http://127.0.0.1:8080
@@ -44,3 +45,4 @@ activedirectory.connectionTimeOut:
spring.mvc.pathmatch.matching-strategy: ANT_PATH_MATCHER
+
diff --git a/publish-service/src/test/java/com/ericsson/eiffel/remrem/publish/integrationtest/EiffelRemRemPublishIT.java b/publish-service/src/test/java/com/ericsson/eiffel/remrem/publish/integrationtest/EiffelRemRemPublishIT.java
index 5478981d..062e8300 100644
--- a/publish-service/src/test/java/com/ericsson/eiffel/remrem/publish/integrationtest/EiffelRemRemPublishIT.java
+++ b/publish-service/src/test/java/com/ericsson/eiffel/remrem/publish/integrationtest/EiffelRemRemPublishIT.java
@@ -112,7 +112,7 @@ public void testGenerateRoutingKey() throws Exception {
JsonParser parser = new JsonParser();
JsonElement json = parser.parse(new FileReader(file)).getAsJsonObject();
String routingKey = messageService.generateRoutingKey(json.getAsJsonObject(), null, null, null);
- assertEquals("eiffel.activity.finished.notag.eiffeltest", routingKey);
+ assertEquals("eiffel.activity.EiffelActivityFinishedEvent.notag.eiffeltest", routingKey);
}
}
}
\ No newline at end of file
diff --git a/publish-service/src/test/java/com/ericsson/eiffel/remrem/publish/service/MessageServiceRMQImplUnitTest.java b/publish-service/src/test/java/com/ericsson/eiffel/remrem/publish/service/MessageServiceRMQImplUnitTest.java
index 6f60cbd6..3c574313 100644
--- a/publish-service/src/test/java/com/ericsson/eiffel/remrem/publish/service/MessageServiceRMQImplUnitTest.java
+++ b/publish-service/src/test/java/com/ericsson/eiffel/remrem/publish/service/MessageServiceRMQImplUnitTest.java
@@ -20,6 +20,7 @@
import static org.junit.Assert.fail;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
@@ -39,6 +40,7 @@
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.ericsson.eiffel.remrem.protocol.MsgService;
+import com.ericsson.eiffel.remrem.publish.config.PropertiesConfig;
import com.ericsson.eiffel.remrem.publish.exception.NackException;
import com.ericsson.eiffel.remrem.publish.exception.RemRemPublishException;
import com.ericsson.eiffel.remrem.publish.helper.PublishUtils;
@@ -215,8 +217,37 @@ public void testRoutingKey() throws Exception {
JsonElement json = parser.parse(new FileReader(file)).getAsJsonObject();
routingKey = PublishUtils.getRoutingKey(msgService, json.getAsJsonObject(), rmqHelper, "fem001", null, null);
if(routingKey != null) {
- assertEquals("eiffel.activity.finished.notag.eiffeltest.fem001", routingKey);
+ assertEquals("eiffel.activity.EiffelActivityFinishedEvent.notag.eiffeltest.fem001", routingKey);
}
}
}
+
+ @Test
+ public void testRoutingKeyPriorSepia() throws FileNotFoundException {
+ RabbitMqProperties semanticsProperties = rmqHelper.getRabbitMqPropertiesMap().get("eiffelsemantics");
+
+ try {
+ // Simulate existence of routing key property file
+ System.setProperty(PropertiesConfig.SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH,
+ "src/test/resources/routing-key-overrides.properties");
+ semanticsProperties.init();
+
+ MsgService msgService = PublishUtils.getMessageService(protocol, msgServices);
+ String routingKey;
+ if (msgService != null) {
+ File file = new File("src/test/resources/EiffelActivityFinishedEvent.json");
+ JsonParser parser = new JsonParser();
+ JsonElement json = parser.parse(new FileReader(file)).getAsJsonObject();
+ routingKey = PublishUtils.getRoutingKey(msgService, json.getAsJsonObject(), rmqHelper, "fem001", null, null);
+ if (routingKey != null) {
+ assertEquals("eiffel.activity.finished.notag.eiffeltest.fem001", routingKey);
+ }
+ }
+ }
+ finally {
+ // Restore non-existence of routing key property file
+ System.clearProperty(PropertiesConfig.SEMANTICS_ROUTINGKEY_TYPE_OVERRIDE_FILEPATH);
+ semanticsProperties.init();
+ }
+ }
}
diff --git a/publish-service/src/test/resources/routing-key-overrides.properties b/publish-service/src/test/resources/routing-key-overrides.properties
new file mode 100644
index 00000000..f951c9ee
--- /dev/null
+++ b/publish-service/src/test/resources/routing-key-overrides.properties
@@ -0,0 +1,98 @@
+EiffelActivityCanceledEvent.family=activity
+EiffelActivityCanceledEvent.type=canceled
+
+EiffelActivityFinishedEvent.family=activity
+EiffelActivityFinishedEvent.type=finished
+
+EiffelActivityStartedEvent.family=activity
+EiffelActivityStartedEvent.type=started
+
+EiffelActivityTriggeredEvent.family=activity
+EiffelActivityTriggeredEvent.type=triggered
+
+EiffelAnnouncementPublishedEvent.family=info
+EiffelAnnouncementPublishedEvent.type=announcement
+
+EiffelArtifactCreatedEvent.family=artifact
+EiffelArtifactCreatedEvent.type=created
+
+EiffelArtifactPublishedEvent.family=artifact
+EiffelArtifactPublishedEvent.type=published
+
+EiffelArtifactReusedEvent.family=artifact
+EiffelArtifactReusedEvent.type=reused
+
+EiffelCompositionDefinedEvent.family=cm
+EiffelCompositionDefinedEvent.type=composition
+
+EiffelConfidenceLevelModifiedEvent.family=artifact
+EiffelConfidenceLevelModifiedEvent.type=modified
+
+EiffelEnvironmentDefinedEvent.family=cm
+EiffelEnvironmentDefinedEvent.type=environment
+
+EiffelFlowContextDefinedEvent.family=flowcontext
+EiffelFlowContextDefinedEvent.type=defined
+
+EiffelIssueVerifiedEvent.family=test
+EiffelIssueVerifiedEvent.type=issueverified
+
+EiffelSourceChangeCreatedEvent.family=cm
+EiffelSourceChangeCreatedEvent.type=scmchange
+
+EiffelSourceChangeSubmittedEvent.family=cm
+EiffelSourceChangeSubmittedEvent.type=scmproposedchange
+
+EiffelTestCaseCanceledEvent.family=test
+EiffelTestCaseCanceledEvent.type=casecanceled
+
+EiffelTestCaseTriggeredEvent.family=test
+EiffelTestCaseTriggeredEvent.type=casetriggered
+
+EiffelTestCaseFinishedEvent.family=test
+EiffelTestCaseFinishedEvent.type=casefinished
+
+EiffelTestCaseStartedEvent.family=test
+EiffelTestCaseStartedEvent.type=casestarted
+
+EiffelTestSuiteFinishedEvent.family=test
+EiffelTestSuiteFinishedEvent.type=suitefinished
+
+EiffelTestSuiteStartedEvent.family=test
+EiffelTestSuiteStartedEvent.type=suitestarted
+
+EiffelTestExecutionRecipeCollectionCreatedEvent.family=test
+EiffelTestExecutionRecipeCollectionCreatedEvent.type=execution
+
+EiffelAlertAcknowledgedEvent.family=alert
+EiffelAlertAcknowledgedEvent.type=alertack
+
+EiffelArtifactDeployedEvent.family=artifact
+EiffelArtifactDeployedEvent.type=deployed
+
+EiffelServiceAllocatedEvent.family=service
+EiffelServiceAllocatedEvent.type=allocated
+
+EiffelServiceDeployedEvent.family=service
+EiffelServiceDeployedEvent.type=deployed
+
+EiffelServiceDiscontinuedEvent.family=service
+EiffelServiceDiscontinuedEvent.type=discontinued
+
+EiffelServiceReturnedEvent.family=service
+EiffelServiceReturnedEvent.type=returned
+
+EiffelServiceStartedEvent.family=service
+EiffelServiceStartedEvent.type=started
+
+EiffelServiceStoppedEvent.family=service
+EiffelServiceStoppedEvent.type=stopped
+
+EiffelAlertRaisedEvent.family=alert
+EiffelAlertRaisedEvent.type=raised
+
+EiffelAlertCeasedEvent.family=alert
+EiffelAlertCeasedEvent.type=ceased
+
+EiffelIssueDefinedEvent.family=test
+EiffelIssueDefinedEvent.type=issuedefined
diff --git a/wiki/markdown/installation.md b/wiki/markdown/installation.md
index 3c7fb141..2ad52f02 100644
--- a/wiki/markdown/installation.md
+++ b/wiki/markdown/installation.md
@@ -10,4 +10,114 @@ Binary is released via [jitPack](https://jitpack.io/#eiffel-community/eiffel-rem
The latest REMReM Publish CLI binary can be downloaded via [publish-cli.jar](https://jitpack.io/#eiffel-community/eiffel-remrem-publish).
-The latest REMReM Publish Service binary can be downloaded via [publish-service.war](https://jitpack.io/#eiffel-community/eiffel-remrem-publish).
\ No newline at end of file
+The latest REMReM Publish Service binary can be downloaded via [publish-service.war](https://jitpack.io/#eiffel-community/eiffel-remrem-publish).
+
+The latest REMReM Publish uses the routing key structure defined in [Eiffel Sepia](https://eiffel-community.github.io/eiffel-sepia/rabbitmq-message-broker.html).
+To make it compatible to prior routing key structure
+create a file at desired location : path/to/routing-key-overrides.properties
+with the below mappings and pass the file location to the jar as follows
+
+Ex: java -DsemanticsRoutingKeyTypeOverrideFilepath=path/to/routing-key-overrides.properties -jar publish-service.war
+
+#########Mappings in routing-key-overrides.properties#############
+
+EiffelActivityCanceledEvent.family=activity
+EiffelActivityCanceledEvent.type=canceled
+
+EiffelActivityFinishedEvent.family=activity
+EiffelActivityFinishedEvent.type=finished
+
+EiffelActivityStartedEvent.family=activity
+EiffelActivityStartedEvent.type=started
+
+EiffelActivityTriggeredEvent.family=activity
+EiffelActivityTriggeredEvent.type=triggered
+
+EiffelAnnouncementPublishedEvent.family=info
+EiffelAnnouncementPublishedEvent.type=announcement
+
+EiffelArtifactCreatedEvent.family=artifact
+EiffelArtifactCreatedEvent.type=created
+
+EiffelArtifactPublishedEvent.family=artifact
+EiffelArtifactPublishedEvent.type=published
+
+EiffelArtifactReusedEvent.family=artifact
+EiffelArtifactReusedEvent.type=reused
+
+EiffelCompositionDefinedEvent.family=cm
+EiffelCompositionDefinedEvent.type=composition
+
+EiffelConfidenceLevelModifiedEvent.family=artifact
+EiffelConfidenceLevelModifiedEvent.type=modified
+
+EiffelEnvironmentDefinedEvent.family=cm
+EiffelEnvironmentDefinedEvent.type=environment
+
+EiffelFlowContextDefinedEvent.family=flowcontext
+EiffelFlowContextDefinedEvent.type=defined
+
+EiffelIssueVerifiedEvent.family=test
+EiffelIssueVerifiedEvent.type=issueverified
+
+EiffelSourceChangeCreatedEvent.family=cm
+EiffelSourceChangeCreatedEvent.type=scmchange
+
+EiffelSourceChangeSubmittedEvent.family=cm
+EiffelSourceChangeSubmittedEvent.type=scmproposedchange
+
+EiffelTestCaseCanceledEvent.family=test
+EiffelTestCaseCanceledEvent.type=casecanceled
+
+EiffelTestCaseTriggeredEvent.family=test
+EiffelTestCaseTriggeredEvent.type=casetriggered
+
+EiffelTestCaseFinishedEvent.family=test
+EiffelTestCaseFinishedEvent.type=casefinished
+
+EiffelTestCaseStartedEvent.family=test
+EiffelTestCaseStartedEvent.type=casestarted
+
+EiffelTestSuiteFinishedEvent.family=test
+EiffelTestSuiteFinishedEvent.type=suitefinished
+
+EiffelTestSuiteStartedEvent.family=test
+EiffelTestSuiteStartedEvent.type=suitestarted
+
+EiffelTestExecutionRecipeCollectionCreatedEvent.family=test
+EiffelTestExecutionRecipeCollectionCreatedEvent.type=execution
+
+EiffelAlertAcknowledgedEvent.family=alert
+EiffelAlertAcknowledgedEvent.type=alertack
+
+EiffelArtifactDeployedEvent.family=artifact
+EiffelArtifactDeployedEvent.type=deployed
+
+EiffelServiceAllocatedEvent.family=service
+EiffelServiceAllocatedEvent.type=allocated
+
+EiffelServiceDeployedEvent.family=service
+EiffelServiceDeployedEvent.type=deployed
+
+EiffelServiceDiscontinuedEvent.family=service
+EiffelServiceDiscontinuedEvent.type=discontinued
+
+EiffelServiceReturnedEvent.family=service
+EiffelServiceReturnedEvent.type=returned
+
+EiffelServiceStartedEvent.family=service
+EiffelServiceStartedEvent.type=started
+
+EiffelServiceStoppedEvent.family=service
+EiffelServiceStoppedEvent.type=stopped
+
+EiffelAlertRaisedEvent.family=alert
+EiffelAlertRaisedEvent.type=raised
+
+EiffelAlertCeasedEvent.family=alert
+EiffelAlertCeasedEvent.type=ceased
+
+EiffelIssueDefinedEvent.family=test
+EiffelIssueDefinedEvent.type=issuedefined
+
+
diff --git a/wiki/markdown/usage/cli.md b/wiki/markdown/usage/cli.md
index 8f20e9d8..55c2b0a9 100644
--- a/wiki/markdown/usage/cli.md
+++ b/wiki/markdown/usage/cli.md
@@ -52,6 +52,12 @@ usage: java -jar
-rk,--routing_key Routing key of the eiffel message.
When provided routing key is not generated and the value provided is used.
+-srkt,--semanticsRoutingKeyTypeOverrideFilepath
+
+ Default implementation uses the routing key defined in Eiffel Sepia.
+ To make it compatible to prior routing key structure provide the
+ path to routing-key-overrides.properties
+
-tag,--tag Tag to be used in routing key.
-v,--list_versions Lists the versions of publish and all loaded protocols.
@@ -72,6 +78,13 @@ Typical examples of usage Eiffel REMReM Publish CLI are described below.
java -jar publish-cli.jar -f publishMessages.json -en mb-exchange -mb hostname -domain publish-domain -ud messageQueue -mp eiffelsemantics
```
+**To support default routing key prior to routing key structure defined in Eiffel Sepia:**
+
+```
+java -jar publish-cli.jar -f publishMessages.json -en mb-exchange -mb hostname -domain publish-domain -ud messageQueue -mp eiffelsemantics -srkt /path/to/routing-key-overrides.properties
+```
+**Note:To get more information on mapping routing-key-overrides.properties see [here](https://github.com/eiffel-community/eiffel-remrem-publish/blob/master/wiki/markdown/installation.md).
+
**If you want to have the message non persistent add np flag:**
```