We relate the machinery of persistence modules to the Legendrian contact homology theory and to Poisson bracket invariants, and use it to show the existence of connecting trajectories of contact and symplectic Hamiltonian flows.