I'm using RabbitMQ as message broker. I have a consumer and a producer. So far I have created a payload with few primitive attributes. The problem is, as long as I need more information from the payload in my consumer, I need to change payload so I can handle in the consumer: this task at the end may be heavy.
I was wondering if I could use some kind of a Map as payload or it is not recommended? Like this, I have a generic payload.
On the other hand, we have Serializable DTO in our application. I guess I could create a Payload containing DTO?
I'm trying to figure out the best way to do it :)