[richfaces-issues] [JBoss JIRA] (RF-12219) Push: Test that messages do not become stale in a queue

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Fri Jul 27 05:16:07 EDT 2012


    [ https://issues.jboss.org/browse/RF-12219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708259#comment-12708259 ] 

Lukáš Fryč edited comment on RF-12219 at 7/27/12 5:15 AM:
----------------------------------------------------------

Hi Milo,

looked once again to your fix, it seems okay in case of single window per single client.
However each client and each browser window needs to establish own connection to the server.

Why? Each client (browser tab/window) is subscribed to particular set of topics, and each PushSession own queue of messages to be delivered to those topics.

If you would connect more requests to the same session, then you are getting Message Queueing concept instead of Topic Subscription.
Basically first client comes, first serves.

----

In detail, each client request which [finds out there are messages in Session's queue|https://github.com/richfaces/core/blob/4cef088fcee550d2d7f0fd4a1b71c6c8631fdb31/impl/src/main/java/org/richfaces/application/push/impl/RequestImpl.java#L100], it initiates broadcasting and once broadcasting ends, it [clears sent messages|https://github.com/richfaces/core/blob/4cef088fcee550d2d7f0fd4a1b71c6c8631fdb31/impl/src/main/java/org/richfaces/application/push/impl/RequestImpl.java#L166],
making them unavailable to further requests.

Additionally there can be only [one request per session|https://github.com/richfaces/core/blob/4cef088fcee550d2d7f0fd4a1b71c6c8631fdb31/impl/src/main/java/org/richfaces/application/push/impl/SessionImpl.java#L99].

----

You should be able to simulate this problem by opening two tabs in one browser - messages will be delivered just to one of them.
                
      was (Author: lfryc):
    Hi Milo,

looked once again to your fix, it seems okay in case of single window per single client.
However each client and each browser window needs to establish own connection to the server.

Why? Each client (browser tab/window) is subscribed to particular set of topics, and each PushSession own queue of messages to be delivered to those topics.

If you would connect more requests to the same session, then you are getting Message Queueing concept instead of Topic Subscription.
Basically first client comes, first serves.

----

In detail, each client request which [finds out there are messages in Session's queue|https://github.com/richfaces/core/blob/4cef088fcee550d2d7f0fd4a1b71c6c8631fdb31/impl/src/main/java/org/richfaces/application/push/impl/RequestImpl.java#L100], it initiates broadcasting and once broadcasting ends, it [clears sent messages|https://github.com/richfaces/core/blob/4cef088fcee550d2d7f0fd4a1b71c6c8631fdb31/impl/src/main/java/org/richfaces/application/push/impl/RequestImpl.java#L166].

----

You should be able to simulate this problem by opening two tabs in one browser - messages will be delivered just to one of them.
                  
> Push: Test that messages do not become stale in a queue
> -------------------------------------------------------
>
>                 Key: RF-12219
>                 URL: https://issues.jboss.org/browse/RF-12219
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-push/poll
>    Affects Versions: 4.2.1.Final
>            Reporter: Lukáš Fryč
>            Assignee: Juraj Húska
>            Priority: Critical
>             Fix For: 4.3.0.Milestone2
>
>
> According to the [Forum reference],
> we can have problems with stale messages.
> I would suggest to write tests for following scenarios and check that queue is destroyed properly:
> * view expires
> * client leaves the page with {{a4j:push}} without proper clean up
> * ...
> Let's brainstorm other scenarios.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list