Spring Application Services

Exercise: Chat Application (Message History)




  1. Implement a component ChatHistory that also listens on the ChatTopic and keeps a history of the exchanged messages.
  2. Implement the method init that sends an empty message to the topic HistoryTopic using a temporary reply queue to receive the previously exchanged messages.
  3. Implement the method onHistory that listens on the topic HistoryTopic and responds by delivering its message history to the sender's reply queue.
Solution