ksqldb

Is it possible to get the latest value for a message key from kafka messages

坚强是说给别人听的谎言 提交于 2021-01-04 03:23:14
问题 Suppose I have different values for a same message key. For example: { userid: 1, email: user123@xyz.com } { userid: 1, email: user456@xyz.com } { userid: 1, email: user789@xyz.com } In this above case I want only the latest value updated by the user, that is, 'user789@xyz.com'. My kafka stream should give me only the third value and not the previous 2 values. 回答1: Since you've not specified a particular client, I'll show you how this can be done with ksqlDB and the newly-added function,

Is it possible to get the latest value for a message key from kafka messages

流过昼夜 提交于 2021-01-04 03:22:54
问题 Suppose I have different values for a same message key. For example: { userid: 1, email: user123@xyz.com } { userid: 1, email: user456@xyz.com } { userid: 1, email: user789@xyz.com } In this above case I want only the latest value updated by the user, that is, 'user789@xyz.com'. My kafka stream should give me only the third value and not the previous 2 values. 回答1: Since you've not specified a particular client, I'll show you how this can be done with ksqlDB and the newly-added function,

Is it possible to get the latest value for a message key from kafka messages

核能气质少年 提交于 2021-01-04 03:22:53
问题 Suppose I have different values for a same message key. For example: { userid: 1, email: user123@xyz.com } { userid: 1, email: user456@xyz.com } { userid: 1, email: user789@xyz.com } In this above case I want only the latest value updated by the user, that is, 'user789@xyz.com'. My kafka stream should give me only the third value and not the previous 2 values. 回答1: Since you've not specified a particular client, I'll show you how this can be done with ksqlDB and the newly-added function,

Is it possible to get the latest value for a message key from kafka messages

北城余情 提交于 2021-01-04 03:22:25
问题 Suppose I have different values for a same message key. For example: { userid: 1, email: user123@xyz.com } { userid: 1, email: user456@xyz.com } { userid: 1, email: user789@xyz.com } In this above case I want only the latest value updated by the user, that is, 'user789@xyz.com'. My kafka stream should give me only the third value and not the previous 2 values. 回答1: Since you've not specified a particular client, I'll show you how this can be done with ksqlDB and the newly-added function,

What's the way of running KSQL from spring boot app

折月煮酒 提交于 2020-12-22 19:51:11
问题 I have a spring boot application that is connected to a kafka cluster. How can I run KSQL from java code? 回答1: At the moment, there is no direct way to use KSQL as a library in java. There is an open issue#734 for the same. But you can run the KSQL statement using REST API and that implementation can be done in Spring Boot Application. A Rest call would look something like this: POST /query HTTP/1.1 Accept: application/vnd.ksql.v1+json Content-Type: application/vnd.ksql.v1+json { "ksql":

What's the way of running KSQL from spring boot app

回眸只為那壹抹淺笑 提交于 2020-12-22 19:45:33
问题 I have a spring boot application that is connected to a kafka cluster. How can I run KSQL from java code? 回答1: At the moment, there is no direct way to use KSQL as a library in java. There is an open issue#734 for the same. But you can run the KSQL statement using REST API and that implementation can be done in Spring Boot Application. A Rest call would look something like this: POST /query HTTP/1.1 Accept: application/vnd.ksql.v1+json Content-Type: application/vnd.ksql.v1+json { "ksql":

Stream join example with Apache Kafka?

被刻印的时光 ゝ 提交于 2020-12-04 05:14:06
问题 I was looking for an example using Kafka Streams on how to do this sort of thing, i.e. join a customers table with a addresses table and sink the data to ES:- Customers +------+------------+----------------+-----------------------+ | id | first_name | last_name | email | +------+------------+----------------+-----------------------+ | 1001 | Sally | Thomas | sally.thomas@acme.com | | 1002 | George | Bailey | gbailey@foobar.com | | 1003 | Edward | Davidson | ed@walker.com | | 1004 | Anne | Kim

Stream join example with Apache Kafka?

橙三吉。 提交于 2020-12-04 05:07:17
问题 I was looking for an example using Kafka Streams on how to do this sort of thing, i.e. join a customers table with a addresses table and sink the data to ES:- Customers +------+------------+----------------+-----------------------+ | id | first_name | last_name | email | +------+------------+----------------+-----------------------+ | 1001 | Sally | Thomas | sally.thomas@acme.com | | 1002 | George | Bailey | gbailey@foobar.com | | 1003 | Edward | Davidson | ed@walker.com | | 1004 | Anne | Kim