How to send and receive a Java Object from Amazon SQS

Viewed 10758

How do I send and receive a Java Object from SQS? For instance, I have a java object Log. I send the object to the message queue as

this.getSqs().sendMessage(new SendMessageRequest(myQueueUrl, log.toString());

However, at the time of retrieving the message from queue, I want to be able to retrieve it as List<Log> and use it as a java Log object inside my application. Any pointers on how to do that?

2 Answers
Related