openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Sciabarra <>
Subject Persistent Kafka Connections
Date Wed, 09 Jan 2019 13:12:21 GMT
Hello whiskers,

I am working on a simple webchat based on OpenWhisk  (full disclosure; it is for the book
on OpenWhisk for O'Reilly!) and I am using MessageHub.

However in the documentation for the messaging package I read that the /whisk.system/messaging/messageHubProduce
is deprecated, and the recommended way is to use a persistent connection to Kafka.

This statement is puzzling me.  My first idea is "why do not they cache the connection?",
but I checked the code for here:

and looks like the producer is cached, so I wonder if the deprecation of messageHubProduce
is still valid.

Furthermore, I wrote an action to send messages to MessageHub with the idea of implementing
a cached connection, and apparently works:

So the question is: is this the correct way to send messages to Kafka (caching connnections?)
Can I recommend this practice in the book?

  Michele Sciabarra

View raw message