Skip to content

Repeated Publish

Backendless supports repeated message processing - a message is published once, but is delivered to subscribers with the specified frequency. Repeated delivery will stop either at the specified time unless it is canceled using the message cancellation API.

DeliveryOptions deliveryOptions = DeliveryOptions()
  ..repeatEvery = 20  // the message will be delivered every 20 seconds
  ..repeatExpiresAt = DateTime.now().add(Duration(seconds: 60));

Backendless.messaging.publish("This message was scheduled 20 sec ago", 
  deliveryOptions: deliveryOptions).then((response) {
    print("message has  been scheduled");
});