Skip to content

Commit

Permalink
issue #3437 inject instanceIdentifier when sending remote index payload
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Arnold <[email protected]>
  • Loading branch information
punktilious committed Jun 21, 2022
1 parent 583903a commit 6c8d712
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
15 changes: 10 additions & 5 deletions fhir-remote-index/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,28 @@
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<!-- The specific DB driver jars are marked as optional; must be re-declared by consuming modules -->
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>jcc</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<optional>true</optional>
</dependency>
<!-- End of optional DB drivers -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
Expand All @@ -76,11 +86,6 @@
<artifactId>testng</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>fhir-persistence-schema</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,10 @@ private void configureDatabaseAccess() {
case POSTGRESQL:
case CITUS:
configureForPostgres();
break;
case DERBY:
configureForDerby();
break;
default:
throw new IllegalArgumentException("Database type not supported: " + this.dbType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ public void process(List<String> messages) throws FHIRPersistenceException {
}
}
}
processWithRetry(unmarshalled);

if (unmarshalled.size() > 0) {
processWithRetry(unmarshalled);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public IndexProviderResponse submit(final RemoteIndexData data) {
final String tenantId = FHIRRequestContext.get().getTenantId();
RemoteIndexMessage msg = new RemoteIndexMessage();
msg.setMessageVersion(RemoteIndexConstants.MESSAGE_VERSION);
msg.setInstanceIdentifier(this.instanceIdentifier);
msg.setTenantId(tenantId);
msg.setData(data.getSearchParameters());
final String message = RemoteIndexSupport.marshallToString(msg);
Expand Down

0 comments on commit 6c8d712

Please sign in to comment.