How do I use the messagegroupid parameter to only receive queue messages tagged with the id I need?
I've been trying to use the line below to retrieve but it will always receive all the queue messages from other group id as well.
List<Message> messages = sqs.receiveMessage(receiveMessageRequest.withAttributeNames("MessageGroupId")).getMessages();
What should be the correct way to do it?