Message guaranteed delivery, reuse X-Atmosphere-Tracking-id

UI Components for JSF
Post Reply
marcintomiak
Posts: 16
Joined: 17 Jul 2014, 13:00
Location: Poland

17 Jul 2014, 13:07

I have a hard time figuring out how to ensure that user will receive message from p:socket even if he or she navigates exactly in the moment when message would be delivered.

I have a common p:socket in template which always connects to the same channel.

Do I have to use some Atmosphere Interceptors which ensure message delivery? Is client given one ID per session or per connection?

How should I approach this issue? It is crucial for me that none of messages is lost.
Last edited by marcintomiak on 18 Jul 2014, 15:06, edited 1 time in total.


marcintomiak
Posts: 16
Joined: 17 Jul 2014, 13:00
Location: Poland

17 Jul 2014, 17:54

Thank you very much for your answer, I will look through links that you've provided.

Obviously I googled in order to find solution for my problem but I couldn't come up with term "guaranteed delivery".

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

18 Jul 2014, 13:58

+1 nice response, Ronald, and nice (re)search. Your search can be used to answer some other topics here in this forum.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

marcintomiak
Posts: 16
Joined: 17 Jul 2014, 13:00
Location: Poland

18 Jul 2014, 15:03

I've looked through provided links.

In fact I had UUIDBroadcasterCache already installed. The problem is that on client side, PrimePush is not aware of the cache and every time p:socket component is rendered and the connection is established, p:socket acquires new X-Atmosphere-Tracking-id, and that is why my messages are lost.

At this moment my issue is rather how to force p:socket to reuse X-Atmosphere-Tracking-id and thus making use of BroadcasterCache.

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

18 Jul 2014, 16:08

Can you look at the PrimeFaces 5.0 user guide and/or showcase, especially the PrimeFaces Push - chat example. There was a lot of source code there to show you how to use the new PrimeFaces Push 5.0 and atmosphere 2.x features. the annotations that are available that helps you to track which messages were received at client, or you can revert to atmosphere (without primefaces push), learn how to use that to get guaranteed delivery.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

marcintomiak
Posts: 16
Joined: 17 Jul 2014, 13:00
Location: Poland

23 Jul 2014, 12:44

I've made a research through PrimePush and Atmosphere and the conclusion is that if I want to reuse UUID between different pages, I have to handle it for myself. Even atmosphere doesn't support providing UUID before subscription. The only way I think is two share between pages a JavaScript Atmosphere Request object that came from first subscription. I'm not sure though if sharing request object is enough to make it working.

marcintomiak
Posts: 16
Joined: 17 Jul 2014, 13:00
Location: Poland

23 Jul 2014, 13:17

If some one is interested I've posted a question on stackoverflow regarding my issue:

http://stackoverflow.com/questions/2490 ... ween-pages

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

23 Jul 2014, 13:23

did you post a question on atmosphere framework's google groups mail list?
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

marcintomiak
Posts: 16
Joined: 17 Jul 2014, 13:00
Location: Poland

23 Jul 2014, 13:26

Nope. I'll do it.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests