I'm interested in open source messaging and/or distributed cache technologies that satisfy the following requirements.
Multiple load-balanced instances of Java web application (probably on Amazon EC2)
It's possible for number of instances to be changing over time for scaling.
When a request comes with an id FOO, the event is cached in memory for a period of time.
The duration of time for which the event is cached is specified in the request payload and varies between requests.
Duration times are relatively small (on the order of minutes).
Persistence is not required. In the rare case that something dramatic happens and the server must be rebooted, it's ok for it to forget about past events.
The information about the request needs to be propagated to all server instances
Propagation of the information must not significantly impact performance of the servers, and especially response latencies. It should to be asynchronous from request processing. However, it should be reasonably fast and scale to large number of requests.
It's ok for different server instances to be out of sync. I.e. it is acceptable that for some short period of time (on the order of seconds) server instance 2 does not know that FOO occurred on server instance 1 until that information gets propagated to it.
Any ideas would be appreciated. If any solutions require specific configuration/customization to fit the requirements, please mention what I'd need to do.
EDIT I don't mean to imply that the current answers aren't relevant, but I wasn't explicit in my question. Please don't just point to every MQ and JSR-107 library under the sun. Only the ones which you have a reason to believe satisfy my requirements.