25.12.11

ActiveMQ in Action–How are message stored by ActiveMQ?

  • Messages sent to queues and topics are stored differently, because there are some storage optimizations that can be made with topics that don’t make sense with queues.
  • Queues
    • Straightforward
      • FIFO
      • Only when that message has been consumed and acknowledged can it be deleted from the broker’s message store.
  • Topics
    • Durable subscribers to a topic.
      • Each consumer gets a copy of the message.
    • Only one copy of message is stored by the broker
    • A durable subscriber object in the store maintains a pointer to its next stored message and dispatches a copy of its consumer.
    • A message can’t be deleted from the store until it’s been successfully delivered to every interested durable subscriber.

No comments: