Retrieve messages from the topic. This resource provides the option to retrieve all messages within the topic or, by including parameters in the request body, to fetch messages after a specified ID or timestamp. The response is limited to a maximum of 50 messages in each batch.
You can enable long polling mode by setting the timeout_secs
parameter. In this mode, the API returns available messages instantly. If there are no messages, the API waits for a maximum of timeout_secs
seconds. If a new message appears within this timeframe, it is instantly returned; otherwise, the API provides an empty list after the call times out.
WARNING: Payloads for the Event streams public API are limited to 1 MB.
USING SINCE_TIME PARAMETER: We recommend using after_message_id
to control the topic message cursor. since_time
should only be used for the first request (to poll messages from a specific timestamp without polling the whole topic), or if you need to re-retrieve messages from the topic. Using since_time
, especially in combination with batch publish and long polling, doesn’t guarantee message order and can lead to skipped messages.