Skip to content

Commit 28760ec

Browse files
authored
Added getRoutingKey method in MsgService interface (#3)
* Added getRoutingKey method in MsgService interface * Added domainId method in MsgService interface * Changed domainId to domain and added javadoc. * Add javadoc for param eiffelMessage * changed log message in CHANGELOG.md file
1 parent 890ffca commit 28760ec

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.0.3
2+
- Added method to get Routing key.
3+
14
## 0.0.2
25
- Added copyright headers to the source code.
36

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ apply plugin: 'eclipse'
3434

3535
jar {
3636
baseName = 'remrem-protocol'
37-
version = '0.0.2'
37+
version = '0.0.3'
3838
}
3939

4040
group 'com.ericsson.eiffel.remrem'

src/main/java/com/ericsson/eiffel/remrem/protocol/MsgService.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,27 @@ public interface MsgService {
6565
* @return ValidationResult with true if validation is success, if validation fails ValidationResult has false and validation message property's.
6666
*/
6767
ValidationResult validateMsg(String msgType, JsonObject jsonvalidateMessage);
68+
69+
/**
70+
* Returns the domain Id from json formatted eiffel message.
71+
* @param eiffelMessage eiffel message in json format
72+
* @return the domainId from eiffelMessage if domainId not available then returns the null value
73+
*/
74+
String getDomainId(JsonObject eiffelMessage);
75+
76+
/**
77+
* Returns Routing key from the messaging library based on the eiffel message eventType.<br>
78+
* In general, Routing key of eiffel message is in the format<br>
79+
<b>&lt;protocol&gt;.&lt;family&gt;.&lt;type&gt;.&lt;tag&gt;.&lt;domain&gt;</b><br>
80+
* &lt;protocol&gt; is used if provided by the protocol library used.<br>
81+
* &lt;family&gt; and &lt;type&gt; are provided by the protocol library.<br>
82+
* &lt;tag&gt; which needs to be put in the Routing key<br>
83+
* &lt;domain&gt; is configured and can be suffixed by a user domain.<br>
84+
* @param eiffelMessage eiffel message in json format
85+
* @param tag
86+
* @param domain from which the message is sent
87+
* @param userDomainSuffix
88+
* @return Routing key in String format.
89+
*/
90+
String getRoutingKey(JsonObject eiffelMessage, String tag, String domain, String userDomainSuffix);
6891
}

0 commit comments

Comments
 (0)