From c8a37e55239ff79edcf5f3cf1702e7e83a4bc872 Mon Sep 17 00:00:00 2001 From: vinothon84 Date: Fri, 12 Apr 2024 20:58:09 +0100 Subject: [PATCH] Fix for Queue Headers --- .../casework/client/notifyclient/NotifyClient.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/uk/gov/digital/ho/hocs/casework/client/notifyclient/NotifyClient.java b/src/main/java/uk/gov/digital/ho/hocs/casework/client/notifyclient/NotifyClient.java index 724ddd589..6ea307b33 100644 --- a/src/main/java/uk/gov/digital/ho/hocs/casework/client/notifyclient/NotifyClient.java +++ b/src/main/java/uk/gov/digital/ho/hocs/casework/client/notifyclient/NotifyClient.java @@ -87,13 +87,12 @@ private void sendMessage(NotifyCommand command, LogEvent event) { private Map getQueueHeaders(String eventType) { - return Map.of(EVENT_TYPE_HEADER, - MessageAttributeValue.builder() - .dataType(RequestData.CORRELATION_ID_HEADER).stringValue(requestData.correlationId()) - .dataType(RequestData.USER_ID_HEADER).stringValue(requestData.userId()) - .dataType(RequestData.USERNAME_HEADER).stringValue(requestData.username()) - .dataType(RequestData.GROUP_HEADER).stringValue(requestData.groups()) - .build()); + return Map.of( + EVENT_TYPE_HEADER, MessageAttributeValue.builder().stringValue(eventType).build(), + RequestData.CORRELATION_ID_HEADER, MessageAttributeValue.builder().stringValue(requestData.correlationId()).build(), + RequestData.USER_ID_HEADER, MessageAttributeValue.builder().stringValue(requestData.userId()).build(), + RequestData.USERNAME_HEADER, MessageAttributeValue.builder().stringValue(requestData.username()).build(), + RequestData.GROUP_HEADER, MessageAttributeValue.builder().stringValue(requestData.groups()).build()); /*return Map.of(EVENT_TYPE_HEADER, new MessageAttributeValue(eventType), RequestData.CORRELATION_ID_HEADER, new SqsStringMessageAttributeValue(requestData.correlationId()),