Add logic and tests for parsing message subjects and IDs.