Adding api for filtering a packet before it is published