So, as far as I understand from Transactions in Apache Kafka, a read_committed consumer will not return the messages which are part of an ongoing transaction. So, I guess, the consumer will have the option to commit its offset past those ongoing-transaction messages (e.g. to read non-transactional messages) or the option to make no further advancement until the encountered transaction is committed/aborted. I just suppose it will be allowed (by Kafka) to skip those pending-transaction records, but then how the consumer will read them when committed considering that its offset might already be far away?
UPDATE
Consider that the topic could have a mix of records (aka messages) coming from non-transactional producers and transactional ones. E.g., consider this partition from a topic:
non-transact-Xmsg, from-transact-producer1-msg, from-transact-producer2-msg, non-transact-Ymsg
If the consumer encounters from-transact-producer1-msg will he skip the message then read non-transact-Ymsg or will he just hang before the not yet committed from-transact-producer1-msg and by doing so it won't read non-transact-Ymsg?
Consider also that could be many transactional producers and so many equivalents of from-transact-producer1-msg, some committed some not. So, from-transact-producer2-msg could be a committed one at the point when the consumer reached non-transact-Xmsg.