Filtering messages by type