Ask Your Question
2

Master API & Types

asked 2016-01-05 20:15:23 -0500

asmodehn gravatar image

While exploring the Master API, I experienced something I didn't expect :

After the last publisher ( and all subscribers ) on a topic is gone, the topic still has a type and is still returned by getTopicTypes().

Did anyone experienced this ? Is it expected ? Or is there some more complex behavior, like timeout or so ?

If it s expected, then it means a topic cannot change type ?

Also any reason why there isn't a similar getServiceTypes() API ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-05 21:34:58 -0500

ahendrix gravatar image

I'm not surprised that topic types persist in the master even after the topic is gone. In general, the master does not implement timeouts; it relies on nodes to unregister themselves when they shut down (yes, this lack of timeouts can be considered a bug).

I would be surprised if topics couldn't change types, once all of the publishers and subscribers are gone. (It's also possible to run multiple publishers with different types on the same topic; I'm not sure what type the master returns in this case. Either way, this is generally very confusing for the subscribers and results in lots of errors).

I don't think the master tracks service types; getSystemState() is not documented as returning the service type.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-05 20:15:23 -0500

Seen: 168 times

Last updated: Jan 05 '16