Results 1 to 2 of 2

Thread: MessageStore / Enumerate messages

  1. #1
    Join Date
    Jan 2012
    Posts
    5

    Default MessageStore / Enumerate messages

    I was looking at MessageStore and according to the documentation it can be used to "mitigate the risk" of messages being "lost in the event of a system failure".

    however, the interface does not allow messages to be enumerated and instead, they can only be retrieved by id. my assumption then, is that the ids must be kept in memory. so when the system does fail, any messages in the store are not lost, but they cannot be used either.

    so by the looks of it, the only benefit you receive from the message store is some degree of asynchronicity and potentially lowered memory use., but not preservation of messages during a system failure.

    am I missing something here?

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Actually you can. You just have to use MessageGroupStore which allows you to correlate stored messages as part of some group identifier. Remember the same MessageGroupStore is used to support persistent QueueChannel and as such it must support FIFO semantics.
    Look at this method:
    Code:
    /**
    * Polls Message from this {@link MessageGroup} (in FIFO style if supported by the implementation)
    * while also removing the polled {@link Message}
    */
    Message<?> pollMessageFromGroup(Object groupId);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •