message: Fix rdkafka consumer being able to miss messages after a rebalance
diff: @@ -368,7 +368,24 @@ export class RdkafkaConsumer extends RdkafkaBase implements IConsumer {
  private processMessage(message: kafkaTypes.Message) {
  const partition = message.partition;
  - if (this.isRebalancing && this.assignedPartitions.has(partition)) {
  + if (!this.assignedPartitions.has(partition)) {
  + /*
  + It is possible for node-rdkafka to send us messages for old partitions after a rebalance is processed.
  + I assume it's due to some librdkafka logic related incoming message queueing.
  + If we try to process this message:
  + 1. The emit "data" event will cause "Received message for untracked partition" to be thrown.
  + 2. A "latestOffset" will be set for this untracked partition.
  + #1 is fine.. but #2 is a huge problem.
  + If the consumer has a latestOffset for an unassigned partition and at some point later, is then
  + assigned that partition, the consumer will start processing messages from that offset.
  + This would result in a gap of missed messages!
  + It needs to start from the latest committed kafka offset in this case.
  + */
  +
  + return;
  + }
  +
  + if (this.isRebalancing) {
  /*
  It is possible to receive messages while we have not yet finished rebalancing
  due to how we wait for the fetchPartitionEpochs call to finish before emitting the rebalanced event.
  