You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
at the last line.. it will reset the index to the last item inserted. So it will be "new [user1] connected".
when in my Interceptor when I call
public List retrieveFromCache(String broadcasterId, AtmosphereResource r) {
....
I received the last item, not the 2 others.
Could we have a way to retreive the messages not sent (by removing them from the cache when retrieveFromCache() is called). If the sent failed, the Interceptor could readded them in the cache manually.
What do you think ?
The text was updated successfully, but these errors were encountered:
There is a problem with SessionBroadcasterCache, if the user use this Cache within his Interceptor.
Suppose that I'm in a AtmosphereHandler.
...
out.sendMessage(Message1);
...
out.sendMessage(Message2);
...
out.broadcast("new [user1] connected");
..
in my Interceptor, I override the out.sendMessage(String); to cache the message and send it later. Like if I'm doing aggregation.
Instead of using my own Cache, I'm using the cache declared in web.xml, atmosphere.xml or by annotation :
``java
@AtmosphereHandlerService(
path = "/*",
supportSession=true,
broadcasterCache=SessionBroadcasterCache.class)
the problem is here :
the Broadcaster will call : trackMessage(...)
and will arrive here :
SessionBroadcasterCache.addToCache(String broadcasterId, AtmosphereResource r, Message message) {
...
session.setAttribute(broadcasterId, String.valueOf(now));
...
at the last line.. it will reset the index to the last item inserted. So it will be "new [user1] connected".
when in my Interceptor when I call
public List retrieveFromCache(String broadcasterId, AtmosphereResource r) {
....
I received the last item, not the 2 others.
Could we have a way to retreive the messages not sent (by removing them from the cache when retrieveFromCache() is called). If the sent failed, the Interceptor could readded them in the cache manually.
What do you think ?
The text was updated successfully, but these errors were encountered: