Follow Us

lanceur backend-1900

Real-time Pub/Sub Engine


Try Kuzzle   Request a demo

Build awesome event-driven apps

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

pubsub_info

Case Study

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

Kuzzle's real-time 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

Developers Corner

Reduce your development time with Kuzzle's SDKs, these provide easy access to Kuzzle's API to help you get started quickly.
To learn more read our guide

languages

  • Javascript
  • Android
  • GO
  • function subscribe() {    
    /** * Subscribe: * A client subscribes to Kuzzle and is notified when a document has a 'message' value */ //Connect to Kuzzle var kuzzle = new Kuzzle("localhost"); //Create a filter that will be used to subscribe to document changes var filter = {exists: {field: "message"}}; kuzzle .collection("mycollection", "myindex") .subscribe(filter, function(error, notification) { if(error) handleError(error); else doSomething(notification); });
    }
    function publish() {    
    /** * Publish: * A client publishes a new document with a 'message' value */ //Connect to Kuzzle var kuzzle = new Kuzzle("localhost"); //Create the document that will trigger the notification kuzzle .collection("mycollection", "myindex") .publishMessage({message: "hello world"});
    }
  • public void subscribe() {    
    /** * Subscribe: * A client subscribes to Kuzzle and is notified when a document has a 'message' value */ //Create a filter that will be used to subscribe to document changes JSONObject filter = new JSONObject() .put("exists", new JSONObject().put("field", "message")); //Subscribe to document changes using the filter kuzzle.collection("mycollection", "myindex") .subscribe(filter, new ResponseListener<NotificationResponse>() { @Override public void onSuccess(NotificationResponse response) { //Triggered each time the document matches the filter System.out.println("notification received :" + response.getResult().toString()); doSomething(response); } @Override public void onError(JSONObject error) { handleError(error); } });
    }
    public void publish() {    
    /** * Publish: * A client publishes a new document with a 'message' value */ // Create the document that will trigger the notification Collection collection = mKuzzleHelper.getKuzzle().collection("mycollection", "myindex"); Document document = new Document(collection); document.setContent("message", "hello world"); collection.createDocument(document);
    }
  • func subscribe() {    
    /** * Subscribe: * A client subscribes to Kuzzle and is notified when a document has a 'message' value */ //Connect to Kuzzle o := types.NewOptions() ro := types.NewRoomOptions() cn := websocket.NewWebSocket("localhost", o) k, _ := kuzzle.NewKuzzle(cn, o) c := collection.NewCollection(k, "mycollection", "myindex") //Create a filter that will be used to subscribe to document changes type SubscribeFiltersField struct { Field string `json:"field"` } type SubscribeFiltersExists struct { Exists SubscribeFiltersField `json:"exists"` } var filter = SubscribeFiltersExists{ Exists: SubscribeFiltersField{ Field: "message", }, } //Subscribe to document changes using the filter rtc := make(chan *types.KuzzleNotification) res := <- c.Subscribe(filter, ro, rtc) if res.Error != nil { handleError(res.Error) } else { go func (rtc chan *types.KuzzleNotification) { //Triggered each time the document matches the filter doSomething(<-rtc) }(rtc) }
    }
    func publish() {    
    /** * Publish: * A client publishes a new document with a 'message' value */ //Connect to Kuzzle o := types.NewOptions() cn := websocket.NewWebSocket("localhost", o) k, _ := kuzzle.NewKuzzle(cn, o) c := collection.NewCollection(k, "mycollection", "myindex") // Create the document that will trigger the notification type doc struct { Message string `json:"message"` } // Publish the document qo := types.NewQueryOptions() c.PublishMessage(&doc{Message: "hello world"}, qo)
    }

They Trust us

partners