# KAFKA:INVALID_OFFSET in MuleSoft: cause and fix

Source page: https://ipaaserrors.com/mulesoft/kafka-invalid-offset
Platform: MuleSoft · Apache Kafka Connector · Code KAFKA:INVALID_OFFSET
Checked against vendor docs: 2026-12-02

KAFKA:INVALID_OFFSET means the partition number given to a Kafka operation is below 0, above the topic's number of partitions, or otherwise invalid. Pass a partition number that exists on the topic.

## Error text

```
Error type: KAFKA:INVALID_OFFSET
```

## Likely causes

- The partition number set for the operation is less than 0, is above the number of partitions, or is an invalid value.

## How to fix it

1. Check how many partitions the topic has.
2. Make sure the partition value passed to the operation is a whole number from 0 up to the last partition.
3. If the value comes from an expression, log it before the operation to see what is actually sent.

## Notes

The MuleSoft troubleshooting page states the cause of this error type but gives no step-by-step fix. The steps above follow directly from that cause.

## Sources

- [Troubleshooting Apache Kafka Connector](https://docs.mulesoft.com/kafka-connector/latest/kafka-connector-troubleshooting)

From iPaaS Errors (https://ipaaserrors.com), part of iPaaS Group. When citing, link to https://ipaaserrors.com/mulesoft/kafka-invalid-offset and the vendor documentation above.
