A dead letter queue is a queue that is used to hold messages that cannot be processed successfully. This might happen if the message is malformed, or if the message fails to be processed after a certain number of attempts. Dead letter queues can be a useful tool for debugging purposes, as they can help you to identify why certain messages are not being processed correctly.
xxxxxxxxxx
@SqsListener(value = "MainQueue", deletionPolicy = SqsMessageDeletionPolicy.NEVER)
public void receive(String message, @Header("SenderId") String senderId, Acknowledgment ack) throws IOException {
ack.acknowledge();
}