Skip to content

Batch & Real time events

Nipun edited this page Sep 12, 2016 · 1 revision

The developer can configure the SDK to send events real-time or batched using the Blueshift Bulk Events API.

There are certain events (for eg. app_open, push_view) that pre-configured by the SDK. These events are always sent in batches. You can learn more about these events (here)

The SDK allows you to specify if an event needs to be sent real-time or in a batch. Events are sent to Blueshift by calling the SDK methods [here] (). The last argument in each method controls whether an event needs to be send real-time or in batch.

Batch Events

Batched events are sent using the [Blueshift Bulk Event API] (https://docs.getblueshift.com/docs/event-api#section--a-name-bulk-a-bulk-events) along with other events. The events are added to a persistent queue which ensures that they are not lost if the user force quits the app. Batches of 100 events are created from the queue every 5 min (or the time interval configured during SDK set-up) and sent to Blueshift using the Bulk Events API called from non UI blocking background thread.

Real-time Events

Your application may prefer sending certain events (for eg. Purchase) real-time to Blueshift. The SDK may store these events in a queue if no network is available. In this situation, the events are sent as a part of the next batch of events, as soon as network is available.