Adding some further details to this topic. I have implemented Server-Sent Events support in svnpubsub. The current format is preserved and the selection is made based on the client Accept header. Sample output for both formats can be found below. Please consider the attached patch.
I have successfully implemented a client in Java using Jersey by following this example, section 15.5.2. Anyone interested in co-developing a Jenkins Build Trigger plugin? How is ASF infra managing build triggers? Please let me know if anyone is interested. Anyone from ASF infra on this list? Thanks, Thomas Å. $ curl -sNv http://localhost:2069/commits > GET /commits HTTP/1.1 > Host: localhost:2069 > User-Agent: curl/7.47.0 > Accept: */* > < HTTP/1.1 200 OK < Transfer-Encoding: chunked < Date: Mon, 05 Dec 2016 16:06:05 GMT < X-Svnpubsub-Version: 1 < Content-Type: application/vnd.apache.vc-notify+json < Server: TwistedWeb/16.0.0 < {"svnpubsub": {"version": 1}} {"stillalive": 1480953980.875444} {"commit": {"committer": "testuser", "log": "test", "repository": "50217dbe-7a01-4030-aaaa-f1baa9200a11", "format": 1, "changed": {"test/test5/": {"flags": "A "}}, "date": "2016-12-05 16:06:29 +0000 (Mon, 05 Dec 2016)", "type": "svn", "id": 97}} {"stillalive": 1480953995.8761} $ curl -sNv -H "Accept: text/event-stream" http://localhost:2069/commits > GET /commits HTTP/1.1 > Host: localhost:2069 > User-Agent: curl/7.47.0 > Accept: text/event-stream > < HTTP/1.1 200 OK < Transfer-Encoding: chunked < Date: Mon, 05 Dec 2016 16:07:41 GMT < X-Svnpubsub-Version: 1 < Content-Type: text/event-stream < Server: TwistedWeb/16.0.0 < event: svnpubsub data: {"version": 1} event: stillalive data: {"stillalive": 1480954076.285757} event: commit data: {"committer": "testuser", "log": "test", "repository": "50217dbe-7a01-4030-aaaa-f1baa9200a11", "format": 1, "changed": {"test/test6/": {"flags": "A "}}, "date": "2016-12-05 16:08:00 +0000 (Mon, 05 Dec 2016)", "type": "svn", "id": 98} event: stillalive data: {"stillalive": 1480954091.286789}
|
svnpubsub-sse_20161205.diff
Description: Binary data