I am working on a Java service that needs to send SMS through Amazon SNS.
I am using Velocity templates to generate personalized emails, and thought about using it for SMS as well.
But I don't think it is the right approach because the AWS SDK method for sending an SMS takes the message as a string. This would force me to generate a file and then read it to get the contents as a string.
The only alternative I can think of is storing the template as TINYTEXT (SMS size limit is 140 bytes) in the database, and use String.replaceAll() instead of velocity.
But I wanted to know if there is a better way to do it or if using velocity would hurt performance that much.