Add new send_each() and send_each_for_multicast() APIs.
send_each vs send_all
send_each sends one HTTP request to V1 Send endpoint for each message in the list. send_all sends only one HTTP request to V1 Batch Send endpoint to send all messages in the array.
send_each uses concurrent.futures.ThreadPoolExecutor to run and wait for all request calls to complete and construct a BatchResponse. An request call to V1 Send endpoint either completes with a success or throws an exception. So if an exception is thrown out, the exception will be caught in send_each and turned into a SendResponse with an exception. Therefore, unlike send_all, send_each does not always throw an exception for a total failure. It can also return a BatchResponse with only exceptions in it.
send_each_for_multicast calls send_each under the hood.
RELEASE NOTE: send_all() and send_multicast() APIs are now deprecated. Use send_each() and send_each_for_multicast() APIs instead.
send_each
vssend_all
send_each
sends one HTTP request to V1 Send endpoint for each message in the list.send_all
sends only one HTTP request to V1 Batch Send endpoint to send all messages in the array.send_each
uses concurrent.futures.ThreadPoolExecutor to run and wait for allrequest
calls to complete and construct aBatchResponse
. Anrequest
call to V1 Send endpoint either completes with a success or throws an exception. So if an exception is thrown out, the exception will be caught insend_each
and turned into aSendResponse
with an exception. Therefore, unlikesend_all
,send_each
does not always throw an exception for a total failure. It can also return aBatchResponse
with only exceptions in it.send_each_for_multicast
callssend_each
under the hood.RELEASE NOTE:
send_all()
andsend_multicast()
APIs are now deprecated. Usesend_each()
andsend_each_for_multicast()
APIs instead.