Newer Version Available
Bulk Subscriptions
You can subscribe to multiple topics at the same time.
To do so, send a JSON array of subscribe messages instead of a single subscribe message. For example this code subscribes to three topics:
1[
2 {
3 "channel": "/meta/subscribe",
4 "clientId": "Un1q31d3nt1f13r",
5 "subscription": "/topic/foo"
6 },
7 {
8 "channel": "/meta/subscribe",
9 "clientId": "Un1q31d3nt1f13r",
10 "subscription": "/topic/bar"
11 },
12 {
13 "channel": "/meta/subscribe",
14 "clientId": "Un1q31d3nt1f13r",
15 "subscription": "/topic/baz"
16 }
17
18]For more information, see the Bayeux Specification.