Spring Core

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 getHistory that sends an empty message to the topic ChatHistoryTopic using a temporary reply queue to receive the previously exchanged messages.
  3. Implement the method onRequest that listens on the topic ChatHistoryTopic and responds by delivering its message history to the sender's reply queue.

Solution