In other words if a topic is not needed on the network, does it get published on the network?
'needed' is a bit vague, but if no one is subscribing, no data is sent over the network. Period.
This is also answered by @dornhege in the question you linked:
First, if no one is subscribing over the network, then nothing should be happening when you publish, i.e. if network bandwidth is wasted somewhere, there must be some connection between a publisher and subscriber (rviz counts!). This is already somewhat implicitly in the core code as if there are no connections, there is no where to send to.
If you feel this is not an adequate answer, can you please clarify why you still have doubts about that?
Originally posted by gvdhoorn with karma: 86574 on 2016-03-25
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by Luis Ruiz on 2016-03-25:
If you execute rostopic list
on any machine you can see the all the topics, but then that means that it is until rostopic list
or rostopic echo
or something like a subscriber happens that the topic is sent?
Comment by gvdhoorn on 2016-03-25:
rostopic list
(and related tools) use the XMLRPC Master API, which doesn't transmit any topic data, just pieces of text. Commands like rostopic echo|bw|hz
do subscribe to topics, so those will result in topic data being transmitted.