writing an actor that aggregates messages in a batch (with a limited batch size or a time bound) is a great exercise if you are new to Akka. It’s a very good fit for the actor model. So, to answer your question, “yes, it can be achieved” ;-)
But considering the details of your use case, I think you can also consider using Akka Streams and, in particular, the AMQP Alpakka Connector. Then, what you could do is use RabbitMQ as a
Source[Message] and use the
groupedWithin operator which will aggregate messages in batches of at most a given size or for as long as a given timeout which is exactly what you are looking for.
Summing up, not only it can be done, but you have two options: (1) using a hand-made actor or (2) using Akka streams.