If I forget to configure it on some node, especially in heterogeneous cluster, some topic actor kind without persistency will be spawned and will cause some problem.
func (c *Cluster) ensureTopicKindRegistered() {
hasTopicKind := false
for name := range c.kinds {
if name == TopicActorKind {
hasTopicKind = true
break
}
}
if !hasTopicKind {
store := &EmptyKeyValueStore[*Subscribers]{}
c.kinds[TopicActorKind] = NewKind(TopicActorKind, actor.PropsFromProducer(func() actor.Actor {
return NewTopicActor(store, c.Logger())
})).Build(c)
}
}
I think it should be added explicitly by user if pubsub functions is used rather than automatically.
I wrote a custom topic actor kind with presistency.
If I forget to configure it on some node, especially in heterogeneous cluster, some topic actor kind without persistency will be spawned and will cause some problem.
I think it should be added explicitly by user if pubsub functions is used rather than automatically.