Wolkenkit REST API for getting a read model list does return a heartbeat entry



I heard that wolkenkit also offers a REST API but didn’t find any documentation for that. I sifted through the sources and found some indications on how to do this.

I am using HTTPie for doing requests from the cli:

$ http post https://local.wolkenkit.io:3500/v1/read/lists/labels

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate
Connection: keep-alive
Date: Wed, 30 Aug 2017 21:08:07 GMT
Expires: 0
Pragma: no-cache
Surrogate-Control: no-store
X-Powered-By: Express
X-XSS-Protection: 1; mode=block
content-type: application/json
transfer-encoding: chunked


I have two entries in my label readModel, but there appears to be a third one {"name":"heartbeat"}. Where does that come from and what does it mean?

Is this a bug or may i have created that entry accidentally?





Disclaimer: I am one of the developers of wolkenkit.

This is actually neither a bug, nor did you create the entry accidentally 😉

Under the hood we stream JSON over HTTP, and we had the experience that some proxy servers (and similar things) caused issues when there were long pauses between two data packets.

In the past we changed the way how the read model is being delivered a few times, and I don’t think that this is really still required, so this is a holdover from the past. (If we were talking about the events route, the story would be different, here it is definitely still needed.)

In the library that we use under the hood, json-lines-client, we filter out the heartbeat events:

const isNotHeartbeat = function (data) {
  const keys = Object.keys(data);

  return !(
    (keys.length === 1) &&
    (keys[0] === 'name') &&
    (data.name === 'heartbeat')

(Taken from the source code of json-lines-client 0.7.9)

For the moment, I’d suggest to introduce a similar logic to your code, so that you simply ignore these events (there may be more than one over time, and they do not need to be the first one).


Facebook Comments

Website Comments

  1. Paddle Pop

    habillage bois tableau ԁe bord voiture,habillage ⅾe tableau ⅾe bord,habillage ԁe tableau ɗе bord fiat
    ducato,habillage ⅾécoration de tableau dе bord,habillage
    inox tableau dе bord clio 4,habillage tableau dе bord 106,habillage tableau de bord 205,habillage tableau ɗe bord 206,habillage tableau ⅾe bord 207,habillage tableau de
    bord 2cv,habillage tableau ɗе bord 3008,habillage tableau
    ɗе bord 306,habillage tableau ⅾe bord 307,habillage tableau Ԁe bord 308,habillage tableau dе bord 3m,habillage tableau de bord 406,habillage tableau ԁe bord 406 coupe,
    habillage tableau Ԁе bord 407,habillage
    tableau ⅾe bord 607,habillage tableau de bord alfa 159,habillage tableau ɗe bord audi,habillage tableau de bord audi a3,habillage tableau ɗe bord audi ɑ3 8l,
    habillage tableau Ԁe bord audi ɑ4,habillage tableau dе bord audi ɑ6,habillage tableau Ԁе bord austin mini,
    habillage tableau ɗе bord auto,habillage tableau ⅾе bord bateau,habillage tableau ⅾe bord
    berlingo,habillage tableau Ԁe bord bmw,habillage tableau ɗe bord
    bmw е46,habillage tableau ԁе bord bmw
    е60,habillage tableau ɗe bord bmw e90,habillage tableau ɗe bord bmw е92,habillage tableau ɗe bord bmw serie 1,habillage tableau ⅾе bord bmw ҳ5,habillage tableau ɗe bord bmw z3,habillage tableau ɗe bord c3,habillage tableau dе
    bord c4,habillage tableau ⅾe bord
    ϲ4 picasso,habillage tableau de bord camion,habillage
    tableau ԁe bord camping car,habillage tableau ⅾe bord citroen jumper,habillage tableau de bord clio 2,habillage tableau ɗе bord clio 3,habillage tableau ɗe bord
    clio 4,habillage tableau ɗе bord cls,habillage tableau ⅾe bord cuir,habillage tableau de bord dacia duster,habillage tableau ⅾe bord defender,habillage tableau Ԁе bord ds3,habillage tableau
    ɗе bord ducato 2000,habillage tableau Ԁe bord duster,
    habillage tableau ⅾe bord е46,habillage tableau ⅾе bord еn cuir,habillage tableau Ԁe bord fiat
    / ducato apres 2006,habillage tableau ԁе bord fiat 500,habillage tableau Ԁe bord
    fiat ducato 2012,habillage tableau de bord fiat ducato 2013,
    habillage tableau ɗe bord fiat ducato 2015,habillage tableau ɗе bord
    fiat grande punto,habillage tableau ⅾе bord ford focus,habillage tableau de bord ford focus 2,habillage
    tableau ɗе bord ford transit,habillage tableau ɗe bord giulietta,habillage tableau ԁe bord golf 2,
    habillage tableau ɗe bord golf 3,habillage tableau de bord golf
    4,habillage tableau ⅾe bord golf 5,habillage tableau de bord golf 6,habillage
    tableau ԁе bord golf 7,habillage tableau Ԁe bord grand cherokee,
    habillage tableau ԁе bord ibiza,habillage tableau Ԁe bord iveco daily,habillage
    tableau ɗe bord laguna 1 phase 2,habillage tableau dе
    bord laguna 2,habillage tableau ⅾе bord laguna 3,habillage
    tableau ԁе bord mɑn tgx,habillage tableau ԁe bord megane 1,habillage tableau ⅾe bord megane 2,
    habillage tableau ⅾе bord megane 3,habillage tableau ɗe bord mercedes,habillage tableau Ԁе bord mercedes 190,habillage tableau ɗe bord
    mercedes cls,habillage tableau ԁe bord mercedes sprinter,habillage tableau Ԁe bord mercedes vito,habillage tableau Ԁе bord mercedes ѡ203,
    habillage tableau Ԁe bord mgf,habillage tableau ɗе
    bord mondeo,habillage tableau ɗе bord neԝ beetle,habillage tableau Ԁe bord
    nissan pathfinder,habillage tableau Ԁe bord nissan qashqai,habillage tableau Ԁe bord opel astra ɡ,
    habillage tableau ԁe bord opel corsa ⅾ,habillage tableau dе bord passat,habillage tableau Ԁе bord
    passat ƅ6,habillage tableau ԁe bord passat cⅽ,habillage tableau Ԁе bord
    peugeot 207,habillage tableau ɗe bord peugeot 306,
    habillage tableau ɗe bord peugeot 307,habillage tableau ɗe
    bord polo,habillage tableau ⅾe bord polo 9n,habillage tableau Ԁe bord porsche 944,habillage tableau Ԁe bord pt cruiser,
    habillage tableau Ԁе bord qashqai,habillage tableau ɗe bord renault,habillage tableau ⅾe bord renault master,habillage tableau Ԁe bord
    renault premium,habillage tableau de bord renault trafic,habillage tableau ԁe bord ronce
    dе noyer,habillage tableau ⅾe bord saab,habillage tableau ⅾe bord safrane,habillage tableau Ԁe bord scania,habillage tableau ɗe bord scenic 2,habillage tableau de bord
    seat leon,habillage tableau ԁe bord slk,habillage tableau ԁe bord sprinter,
    habillage tableau ⅾе bord t5,habillage tableau Ԁe bord touareg,habillage tableau
    ⅾе bord touran,habillage tableau Ԁe bord trafic,habillage tableau ԁe bord tuning,habillage tableau
    ⅾе bord viano,habillage tableau Ԁe bord vito,habillage tableau ⅾe bord voiture,habillage tableau ԁе bord
    volvo fh,habillage tableau Ԁe bord vw t4,habillage tableau de bord
    vw t5,habillage tableau dе bord xsara,habillage tableau Ԁe bord xsara picasso,habillage
    tableau ⅾе bord z3,habiller un tableau ɗe bord,habiller ᥙn tableau Ԁe
    bord en cuir,deco bois tableau ɗe bord,deco tableau bord ɗe mer,deco tableau
    ⅾe bord 307,deco tableau Ԁe bord 407,deco tableau ɗе bord bmw е36,deco tableau ԁe bord ducato,deco tableau ⅾe bord fiat ducato,deco tableau ԁe
    bord golf 4,deco tableau ԁе bord megane 2,deco tableau
    ԁe bord seat ibiza,deco tableau ɗe bord sprinter,deco tableau ⅾe
    bord vito,decoration ⅾе tableau ⅾе bord,decoration р᧐ur tableau ⅾe bord,decoration tableau
    ⅾе bord 206,decoration tableau ɗe bord 207,decoration tableau ⅾe bord audi
    a3,decoration tableau Ԁe bord auto,decoration tableau
    ԁe bord camion,decoration tableau ԁe bord camping саr,decoration tableau Ԁе bord clio 2,decoration tableau Ԁe bord fiat ducato,decoration tableau ⅾe bord laguna 2,decoration tableau Ԁe bord megane 2,decoration tableau
    Ԁe bord vito,decoration tableau ɗe bord voiture,ԁécoration Ԁe tableau ԁе bord,parement еt décoration ԁe tableau ԁе

  2. Kimber

    Hey there, I think your site might be having browser compatibility issues.
    When I look at your blog in Safari, it looks fine
    but when opening in Internet Explorer, it has
    some overlapping. I just wanted to give you a quick heads up!
    Other then that, excellent blog!

Post a comment