You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "kcheng.mvp" <kc...@gmail.com> on 2018/09/13 19:52:54 UTC

KafkaStreamer and IgniteDataStreamer dynamic cache name

Seems KafkaStreamer and IgniteDataStreamer has one to one mapping.

that's to say a KafkaStreamer can only persistent to one cache.

right now my case is a bit complicated.

KafkaStreamer<String, &lt;b>GenericEntity*> kafkaStreamer = new
KafkaStreamer<>();

during persist phrase, I need to save a *GenericEntity* to a cache which
depends on one property of

*GenericEntity*

as 
IgniteDataStreamer<String, Comment> stmr = ignite.dataStreamer("cache_name")
just accept a single cache name as parameter.

so seems there is no way to dynamic choose a cache.

 






--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: KafkaStreamer and IgniteDataStreamer dynamic cache name

Posted by akurbanov <an...@gmail.com>.
Hello,

If you have some way to determine required cache name for update from your
data model, then you can implement custom  StreamVisitor
<https://apacheignite.readme.io/docs/data-streamers#streamvisitor>   for the
DataStreamer, code example is on the same page. 




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/