Skip to content

Commit

Permalink
DATAGO-66413: Rename correlationId -> commandCorrelationId (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronRushton authored Dec 7, 2023
1 parent 3d1db1a commit b61cb3a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@Data
public class CommandMessage extends MOPMessage {

private String correlationId;
private String commandCorrelationId;
private String context;
private String serviceId;
private List<CommandBundle> commandBundles;
Expand All @@ -22,7 +22,7 @@ public CommandMessage() {
}

public CommandMessage(String serviceId,
String correlationId,
String commandCorrelationId,
String context,
List<CommandBundle> commandBundles) {
super();
Expand All @@ -31,7 +31,7 @@ public CommandMessage(String serviceId,
.withVersion("1")
.withUhFlag(MOPUHFlag.ignore);
this.serviceId = serviceId;
this.correlationId = correlationId;
this.commandCorrelationId = commandCorrelationId;
this.context = context;
this.commandBundles = commandBundles;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private void sendResponse(CommandMessage request) {
Map<String, String> topicVars = Map.of(
"orgId", request.getOrgId(),
"runtimeAgentId", eventPortalProperties.getRuntimeAgentId(),
"correlationId", request.getCorrelationId()
"correlationId", request.getCommandCorrelationId()
);
commandPublisher.sendCommandResponse(request, topicVars);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void testCommandManager() {
message.setActorId("myActorId");
message.setOrgId(eventPortalProperties.getOrganizationId());
message.setTraceId("myTraceId");
message.setCorrelationId("myCorrelationId");
message.setCommandCorrelationId("myCorrelationId");
message.setCommandBundles(List.of(
CommandBundle.builder()
.executionType(ExecutionType.serial)
Expand Down Expand Up @@ -101,6 +101,6 @@ public void testCommandManager() {
Map<String, String> topicVars = topicArgCaptor.getValue();
assert topicVars.get("orgId").equals(eventPortalProperties.getOrganizationId());
assert topicVars.get("runtimeAgentId").equals(eventPortalProperties.getRuntimeAgentId());
assert topicVars.get("correlationId").equals(message.getCorrelationId());
assert topicVars.get("correlationId").equals(message.getCommandCorrelationId());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ private void setMessageParams(String serviceId, String correlationId, String con
message.setOrgId(eventPortalProperties.getOrganizationId());
message.setTraceId("myTraceId");
message.setServiceId(serviceId);
message.setCorrelationId(correlationId);
message.setCommandCorrelationId(correlationId);
}


Expand Down

0 comments on commit b61cb3a

Please sign in to comment.