Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
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.