Need some suggestions in choosing DynamoDB partition key and sort key to retrieve all public and private messages in a chat.
In the same chat room, users can send public messages and also private messages to specific people.
DynamoDB model:
For public messages: hashkey - chatId; sortKey - timestamp
For private messages: hashkey - chatId; sortKey - userId#timestamp
I'm facing difficulty in choosing primary keys which will return both these type of messages in a single query.