I have a camel endpoint that sees a list of objects come in. The list can contain between 1 and N internal objects. I need to prevent the internal object been a duplicate for a time period of time (say 5 mins). I was looking for a way to create an Expression that would take the exchange, ensure that the message type is correct, cast it and iterate through the list of objects, getting and storing the hashcode of each object. This would hopefully allow me to check for duplicates and remove them.
I just cannot get around how this is to be done using Expressions. Would greatly appreciate any input on where to start.