-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org
iQIzBAEBCgAdFiEE8osu2CcCCF5douGQu8PBaGu5w1EFAl26qtIACgkQu8PBaGu5
w1HWKg/+I8GBMPVuuTjkC8832uEmRpHeZrXRRrRlDuiIwpm3DzvDKwQyUlJUK0wm
jgyLl+jvbqLnOGZQGfqm5Ks4hWE/W/40vP7BxhDa5WjD5I94JGwKYnGTVj6lZfeg
NkDfsWpZcP9SX9lCjAOKd8dNAIusEXITKUiNhKySCv+S0A6nN9hUNSoQUIl//8W/
YQ4KE9RvuSc3fJdi9xUKe3dNChTnDbX5BBQrdAgE6u3x0s6mnv3LZfvOI7q8I9sW
OUrN/OF276gDRW4Fp1y2C1m3jQP37Ihu8h2DiG2h66wafe+UYJdM3DflX99V5HB2
tjNAz97dWAeLqX/1fclVWXvfowcJLzr4u24gVGqiypEL8omg/Bi/ZYh9jCpUNc2n
+TQdeXmQsGav9/LQ/Yhup51ztWLYUsdw0C7nKawVEZHebrli3y1ufs3KGe1v+8+N
jD0U/xEMuHjbsyFLuE8Ykpb/YYNFWVx+n+XNv4Av96ITm158MC20Kcgysyo9UqSr
OzLzf1tuPBMUa6JgyAKp+uhwoUY2d7RvsUAgX1bRNa6fBiDkKWulnLDZ0c1BQ0bk
ChV3pVmSdMPWVSipQZv9pMzcBRjKuoyaAjlp1CnDxPY+kaE/P4e53Ze2L9SSEQ6n
DelZyQZ/rbFwI6Db4UScbYRM1eSXYIYOE7y0qdjfb2lviXUx4XM=
=JePA
-----END PGP SIGNATURE-----
Well, the `configure()` method is there to configure the serde :)
Hence, it might be a good place to instantiate the state of the serde,
ie, to create a `SchemaStore` instance.
For the passed in map: the full `StreamsConfig` will be passed into it,
hence, you can add any configuration you want to the global
`KafkaStreams` configuration and it will be forwarded.
Hope this helps.
-Matthias
On 10/28/19 5:34 AM, Bart van Deenen wrote:
> Hi all
>
> I need a custom serde for Kafka. Our serde needs a SchemaStore instance with some state, and I'm trying to figure out how to get this into the serde.
> I'm trying to follow along with this example
> https://github.com/apache/kafka/blob/ad5f31c3e6868757eab9c8dd71efd5fd65f06ac6/streams/examples/src/main/java/org/apache/kafka/streams/examples/pageview/PageViewTypedDemo.java#L102
>
> and I don't understand what the configure method does. What is it for, and what can I stick in the map? Following along with the example, I see that `serdeProps` sets the `tClass` field to the class that you want to (de)serialize. Why?
>
> Thanks
>
> Bart
>
Comment: GPGTools - https://gpgtools.org
iQIzBAEBCgAdFiEE8osu2CcCCF5douGQu8PBaGu5w1EFAl26qtIACgkQu8PBaGu5
w1HWKg/+I8GBMPVuuTjkC8832uEmRpHeZrXRRrRlDuiIwpm3DzvDKwQyUlJUK0wm
jgyLl+jvbqLnOGZQGfqm5Ks4hWE/W/40vP7BxhDa5WjD5I94JGwKYnGTVj6lZfeg
NkDfsWpZcP9SX9lCjAOKd8dNAIusEXITKUiNhKySCv+S0A6nN9hUNSoQUIl//8W/
YQ4KE9RvuSc3fJdi9xUKe3dNChTnDbX5BBQrdAgE6u3x0s6mnv3LZfvOI7q8I9sW
OUrN/OF276gDRW4Fp1y2C1m3jQP37Ihu8h2DiG2h66wafe+UYJdM3DflX99V5HB2
tjNAz97dWAeLqX/1fclVWXvfowcJLzr4u24gVGqiypEL8omg/Bi/ZYh9jCpUNc2n
+TQdeXmQsGav9/LQ/Yhup51ztWLYUsdw0C7nKawVEZHebrli3y1ufs3KGe1v+8+N
jD0U/xEMuHjbsyFLuE8Ykpb/YYNFWVx+n+XNv4Av96ITm158MC20Kcgysyo9UqSr
OzLzf1tuPBMUa6JgyAKp+uhwoUY2d7RvsUAgX1bRNa6fBiDkKWulnLDZ0c1BQ0bk
ChV3pVmSdMPWVSipQZv9pMzcBRjKuoyaAjlp1CnDxPY+kaE/P4e53Ze2L9SSEQ6n
DelZyQZ/rbFwI6Db4UScbYRM1eSXYIYOE7y0qdjfb2lviXUx4XM=
=JePA
-----END PGP SIGNATURE-----
Well, the `configure()` method is there to configure the serde :)
Hence, it might be a good place to instantiate the state of the serde,
ie, to create a `SchemaStore` instance.
For the passed in map: the full `StreamsConfig` will be passed into it,
hence, you can add any configuration you want to the global
`KafkaStreams` configuration and it will be forwarded.
Hope this helps.
-Matthias
On 10/28/19 5:34 AM, Bart van Deenen wrote:
> Hi all
>
> I need a custom serde for Kafka. Our serde needs a SchemaStore instance with some state, and I'm trying to figure out how to get this into the serde.
> I'm trying to follow along with this example
> https://github.com/apache/kafka/blob/ad5f31c3e6868757eab9c8dd71efd5fd65f06ac6/streams/examples/src/main/java/org/apache/kafka/streams/examples/pageview/PageViewTypedDemo.java#L102
>
> and I don't understand what the configure method does. What is it for, and what can I stick in the map? Following along with the example, I see that `serdeProps` sets the `tClass` field to the class that you want to (de)serialize. Why?
>
> Thanks
>
> Bart
>
Comments
Post a Comment