If I am processing a message that contains a large block of JSON that I need to split up into small messages that I want to query on either key X or key Y. Is it best to have two different topics with different keys, even though the message body will be identical in both cases?
It depends, since this is general, it depends on how you want to query it. If you use Kafka Connect and put it in some database, once will be enough.
How do you mean query on “key X or key Y”? Kafka doesn’t really support that query pattern. You can sort of make it work with Kstreams(interactive queries) or ksqldb(push queries)