ably / ably-php

PHP client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
51 stars 10 forks source link

Batch Mode, sending multiple messages to multiple channels #98

Closed carbontwelve closed 3 years ago

carbontwelve commented 3 years ago

I am aware that batch message sending is still a "beta" feature of the REST api, and am also aware that this library does current'y seem to support usage of batch mode when sending multiple messages to the same channel.

However it would be very useful if it provided a batch helper for sending different messages to different channels all within one Api call.

┆Issue is synchronized with this Jira Uncategorised by Unito

owenpearson commented 3 years ago

Hi @carbontwelve. You can send different messages to different channels in a batch publish by sending an array of BatchSpec objects in the request body. See the "Using multiple BatchSpec objects in an array" section here. I hope this helps.