Follow Us

Realtime pub/sub engine

Build awesome event-driven user experiences

Build event-driven apps with our powerful realtime pub/sub query language. Ideal for data synchronization, messaging, push notifications, geofencing, analytics probes, IoT orchestration and more.
Read the documentation to learn more

Case Study

Digital banking: a second screen to photograph, upload and sign documents

Kuzzle Backend’s realtime pub/sub engine enables multi-screen synchronization, providing a uniform experience that keeps the user engaged.
In the video below, the user completes an online subscription using their mobile device, which provides an interface that is better suited than that of a desktop computer for capturing and uploading a photo, and providing a signature.
Read the complete case study

Blazing fast pub/sub engine

Developers Corner

Reduce your development time with Kuzzle's SDKs, these provide high-level APIs to the Kuzzle Backend to help you get started quickly.
To learn more read our guide

  • Javascript
  • Android
  • GO
  • /* Subscribe to data changes in an app */

    var kuzzle = new Kuzzle('localhost');

    kuzzle
      .collection('collection', 'index')
      .subscribe({equals: {city: 'nyc'}}, function (error, notification) {
        console.log(notification.document.content.venue);
      })
      .onDone(function (error, room) {
        /* we are now subscribed to the room */
      });
    kuzzle
      .collection('collection', 'index')
      .publishMessage({city: 'nyc', venue: 'MoMa'})
      .publishMessage({city: 'boston', venue: 'TD Garden'})
      .publishMessage({city: 'nyc', venue: 'Madison Square Garden'});
    });

    // output:
    // MoMa
    // Madison Square Garden
  • /* Subscribe to data changes in an app */
    
    Kuzzle kuzzle = new Kuzzle("localhost");
    
    JSONObject filter = new JSONObject().put("exists",
      new JSONObject().put("field", "message"));
    
    kuzzle.collection("mycollection", "myindex")
      .subscribe(filter, new ResponseListener<NotificationResponse>() {
        @Override
        public void onSuccess(NotificationResponse object) {
          // triggered each time a document is updated !
          System.out.println("message received from kuzzle:" + object.getResult().toString());
        }
      });
    // Create document
    
    Kuzzle kuzzle = new Kuzzle("localhost");
    KuzzleCollection collection = kuzzle.collection("mycollection", "myindex");
    KuzzleDocument document = new Document(collection);
    document.setContent("message", "hello world");
    
    collection.createDocument(document);
              
  • 
    ro := types.NewRoomOptions()
    cn := websocket.NewWebSocket(":7512", o)
    k, _ := kuzzle.NewKuzzle(cn, o)
    c := collection.NewCollection(k, "mycollection", "myindex")
    
    // Subscribing to offers in London and Paris
    type SubscribeFiltersValues struct {
      Values []string `json:"values"`
    }
    type SubscribeFilters struct {
      Cities SubscribeFiltersValues `json:"city"`
    }
    var filters = SubscribeFilters{
      Cities: SubscribeFiltersValues{
        Values: []string{"london", "paris"},
      },
    }
    rtc := make(chan types.KuzzleNotification)
    res := <- c.Subscribe(filters, ro, rtc)
    
    if res.Error != nil {
        fmt.Println(res.Error)
    } else {
      go func (rtc chan types.KuzzleNotification) {
        fmt.Println(<-rtc)
      }(rtc)
    }
    
    
    // Publishing a document matching the subscribe filter
    
    type offerDocument struct {
      City    string `json:"city"`,
      OfferId int    `json:"offerId"`
    }
    
    res, _ := c.PublishMessage(&offerDocument{City: "paris"}, o)
    

They Trust us