diff --git a/src/main/java/org/miracum/streams/fhirtoserver/S3BundleStore.java b/src/main/java/org/miracum/streams/fhirtoserver/S3BundleStore.java index f6dd41a..dc41a63 100644 --- a/src/main/java/org/miracum/streams/fhirtoserver/S3BundleStore.java +++ b/src/main/java/org/miracum/streams/fhirtoserver/S3BundleStore.java @@ -52,7 +52,8 @@ public Void storeBatch(List bundles, MessageHeaders headers) merger.mergeSeperateDeleteBundles( bundles, mergerConfig.entryUniquenessFhirpathExpression()); - // extract all POST/PUT bundle entries (mergedBundle.deleteBundle() contains the DELETE entries) + // extract all POST/PUT bundle entries (mergedBundle.deleteBundle() contains the + // DELETE entries) var resources = BundleUtil.toListOfResources(fhirContext, mergedBundle.bundle()); var grouped = resources.stream().collect(Collectors.groupingBy(IBaseResource::fhirType)); @@ -171,7 +172,7 @@ private void storeDeleteBundles( (Long) headers.get(KafkaHeaders.RECEIVED_TIMESTAMP, ArrayList.class).getFirst(); // in Spring Kafka all messages in a batch are from the same partition var partition = - (Long) headers.get(KafkaHeaders.RECEIVED_PARTITION, ArrayList.class).getFirst(); + (Integer) headers.get(KafkaHeaders.RECEIVED_PARTITION, ArrayList.class).getFirst(); var startOffset = (Long) headers.get(KafkaHeaders.OFFSET, ArrayList.class).getFirst(); var objectKey = @@ -201,7 +202,8 @@ public Void storeSingleBundle(Bundle bundle, MessageHeaders messageHeaders) merger.mergeSeperateDeleteBundles( List.of(bundle), mergerConfig.entryUniquenessFhirpathExpression()); - // extract all POST/PUT bundle entries (mergedBundle.deleteBundle() contains the DELETE entries) + // extract all POST/PUT bundle entries (mergedBundle.deleteBundle() contains the + // DELETE entries) var resources = BundleUtil.toListOfResources(fhirContext, mergedBundle.bundle()); var grouped = resources.stream().collect(Collectors.groupingBy(IBaseResource::fhirType));