remove duplicates by bringing redis publish outside of io conenct