Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-20 Thread Eric Beabes
Daniel, Thanks again. Accidentally sent the previous message before finishing typing the whole thing. Anyway, I've so much to learn about these 'implicits' but I generally get the idea. It's compiling fine now. It's sending out "blank" messages but that's the next challenge. Thanks again.

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-20 Thread Eric Beabes
Wow. This is amazing Daniel. THANKS A LOT! On Fri, Nov 20, 2020 at 9:44 AM Daniel Hinojosa wrote: > By the way. It was even cleaner than that. I decided on a hunch this > morning that there has to be something simpler and cleaner Checked the > documentation and there it was. > > You can just

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-20 Thread Daniel Hinojosa
By the way. It was even cleaner than that. I decided on a hunch this morning that there has to be something simpler and cleaner Checked the documentation and there it was. You can just import these two statements and just do the stream without implicit bindings: import

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-19 Thread Daniel Hinojosa
FYI, my goal was to get it to compile, since that is where implicit resolution takes place. Obviously, you would need to plug in the properties, start the stream, add a shutdown hook, etc. On Fri, Nov 20, 2020 at 12:56 AM Daniel Hinojosa < dhinoj...@evolutionnext.com> wrote: > Done. I am using

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-19 Thread Daniel Hinojosa
Done. I am using SBT for the build tool. I created an application and put it here https://github.com/dhinojosa/kafka-streams-scala The implicits for SessionWindowedSerde from this line below. The reason is I am turning off the timeWindowSerde, and that just leaves the SessionWindowSerde, the

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-19 Thread Eric Beabes
Daniel, I copied your code from here: https://gist.github.com/dhinojosa/390f3a98d271272bbea90765cb58e735 Still getting the same error message. Actually, I am not sure why it would work since you don't have implicits for SessionWindowedSerde. By the way, which versions of Scala & Kafka did you

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-19 Thread Liam Clarke-Hutchinson
That said John, nothing wrong with being explicit in code. :) On Fri, 20 Nov. 2020, 1:46 pm John Roesler, wrote: > Oh, nice. Thanks, Daniel! > > That’s much nicer than my ham-handed approach. > > Thanks, > John > > On Thu, Nov 19, 2020, at 17:44, Daniel Hinojosa wrote: > > Hope this helps, I

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-19 Thread John Roesler
Oh, nice. Thanks, Daniel! That’s much nicer than my ham-handed approach. Thanks, John On Thu, Nov 19, 2020, at 17:44, Daniel Hinojosa wrote: > Hope this helps, I tried copying your code into a sample application. I got > it to compile with the implicits all resolving. I think the trick was

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-19 Thread Daniel Hinojosa
Hope this helps, I tried copying your code into a sample application. I got it to compile with the implicits all resolving. I think the trick was there were two implementations for Windowing Serdes. You just need to block one from the imports. See if that fits with what you are doing. Oh also,

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-19 Thread John Roesler
Hi Eric, Sure thing. Assuming the definition of ‘produced’ you had tried in your code, it’s just: ... .toStream.to("streams-pipe-output")(produced) As far as the json serde goes, I think that I wrote an example of using Jackson to implement a serde in Confluent’s kafka-streams-examples repo.

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-18 Thread Eric Beabes
Not sure what you mean by "pass it explicitly". The definition of 'to' is given below. Can we pass it explicitly in this case. If yes, can you please show me how? def to(topic: String)(implicit produced: Produced[K, V]): Unit = inner.to(topic, produced) Also not sure how to use a self

Re: Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-18 Thread John Roesler
Hi Eric, Ah, that’s a bummer. The correct serde is the session windowed serde, as I can see you know. I’m afraid I’m a bit rusty on implicit resolution rules, so I can’t be much help there. But my general recommendation for implicits is that when things get weird, just don’t use them at all.

Kafka Streams: SessionWindowedSerde Vs TimeWindowedSerde. Ambiguous implicit values

2020-11-18 Thread Eric Beabes
I keep getting '*ambiguous implicit values*' message in the following code. I tried several things (as can be seen from a couple of lines I've commented out). Any ideas on how to fix this? This is in *Scala*. def createTopology(conf: Config, properties: Properties): Topology = {//implicit