Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-12605

REST event listeners

XMLWordPrintable

      Add event listeners to the REST endpoint.
      These should use HTTP Server-Sent-Events
      https://html.spec.whatwg.org/multipage/server-sent-events.html

      Cache listeners:

      GET /v2/caches/cacheName?action=listen[&includeCurrentState=true|false][&filterFactoryName=...][&converterFactoryName=...][&includeMetadata=true|false]

      This will result in a response with content-type text/event-stream followed by a stream of cache events.
      Each event follows the following structure:

      event: [created|modified|removed|expired]
      data: [json representantion of event]
      

      the data field will contain a JSON representation of the event:

      { 
        key: {},
        value: {},
        metadata: {}
      }
      

            ttarrant@redhat.com Tristan Tarrant
            ttarrant@redhat.com Tristan Tarrant
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: