Skip to content

Commit

Permalink
16609 part 2 fix (#16616)
Browse files Browse the repository at this point in the history
Update FHIRFunctions to encode poison queue message in the case of SubmissionSenderNotFound
  • Loading branch information
arnejduranovic authored Nov 21, 2024
1 parent f0972f3 commit 9258b5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ class FHIRFunctions(
actionLogger.errors.takeIf { it.isNotEmpty() }?.map { it.detail.message }?.toString()
)
submissionTableService.insertSubmission(tableEntity)
queueAccess.sendMessage("${messageContent.messageQueueName}-poison", message)
val encodedMsg = Base64.getEncoder().encodeToString(message.toByteArray())
queueAccess.sendMessage("${messageContent.messageQueueName}-poison", encodedMsg)
return emptyList()
} catch (ex: Exception) {
// We're catching anything else that occurs because the most likely cause is a code or configuration error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ import tech.tablesaw.api.StringColumn
import tech.tablesaw.api.Table
import java.nio.charset.Charset
import java.time.OffsetDateTime
import java.util.Base64
import java.util.UUID

@Testcontainers
Expand Down Expand Up @@ -334,8 +335,7 @@ class FHIRConverterIntegrationTests {
verify(exactly = 1) {
QueueAccess.sendMessage(
"${QueueMessage.elrSubmissionConvertQueueName}-poison",
queueMessage

Base64.getEncoder().encodeToString(queueMessage.toByteArray())
)
}
}
Expand Down

0 comments on commit 9258b5d

Please sign in to comment.