Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jQuery] [long-polling] callbacks for aggregated messages still not fired properly #615

Closed
nite23 opened this issue Sep 13, 2012 · 4 comments

Comments

@nite23
Copy link
Contributor

nite23 commented Sep 13, 2012

Possibly related to #568, #552.

Whenever two aggregated messages arrive to client, onMessage is fired only for the last one.

raw message:
142|{"source":{"type":"customer","uuid":"3144563d-2030-4eb6-a989-6fd6c0aebddf"},"payload":{"type":"newD"},"destination":{"type":"deptA","id":164}}142|{"source":{"type":"customer","uuid":"bd10db52-fa93-454d-9209-16761cac5f89"},"payload":{"type":"newD"},"destination":{"type":"deptA","id":164}}

Tested on firefox 15.0.1, glassfish 3.1.2.2, atmosphere 1.0, long-polling transport.

@jfarcand
Copy link
Member

Hum...I did tested several times that scenario. The raw message was sent in one packet, right?

@nite23
Copy link
Contributor Author

nite23 commented Sep 13, 2012

Yes, a single packet.

Here's the response recorded in wireshark:
HTTP/1.1 200 OK
X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2.2 Java/Oracle Corporation/1.7)
Server: GlassFish Server Open Source Edition 3.1.2.2
Pragma: No-cache
Cache-Control: no-cache, no-store, no-cache, must-revalidate
Expires: Thu, 01 Jan 1970 01:00:00 CET
Expires: -1
Pragma: no-cache
Content-Type: application/json;charset=UTF-8
Content-Encoding: gzip
Vary: Accept-Encoding
Content-Length: 165
Accept-Ranges: bytes
Date: Thu, 13 Sep 2012 12:47:01 GMT
X-Varnish: 1221946806
Age: 0
Via: 1.1 varnish
Connection: keep-alive

a gzipped response body follows. here it's decoded to plaintext:
142|{"source":{"type":"customer","uuid":"cfd3b9ef-807a-4401-8edc-bc510ca5e5d3"},"payload":{"type":"newD"},"destination":{"type":"deptA","id":165}}142|{"source":{"type":"customer","uuid":"3c4dc59f-1603-4b27-9dd1-6d2a9a44c8dd"},"payload":{"type":"newD"},"destination":{"type":"deptA","id":165}}

@jfarcand
Copy link
Member

OK it works as expected with WebSocket, not sure why it has issue with long-polling. Digging

@jfarcand
Copy link
Member

Workaround: set the

 executeCallbackBeforeReconnect : true

jfarcand added a commit that referenced this issue Sep 13, 2012
jfarcand added a commit that referenced this issue Sep 18, 2012
jfarcand added a commit that referenced this issue Sep 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants