This article provides troubleshooting tips for issues that you might run into when using Event Hubs for Apache Kafka.
Server Busy exceptionYou might see ThrottledRequests metrics because of Kafka throttling. With AMQP clients, Event Hubs immediately returns a server busy exception upon service throttling. It's equivalent to a "try again later" message. In Kafka, incoming messages are delay before being acknowledged while outgoing message will see delayed delivery. The delay length is returned in milliseconds as throttle_time_ms
in the produce/fetch response. In most cases, these delayed requests aren't logged as ThrottledRequests metrics on Event Hubs dashboards. Instead, the response's throttle_time_ms
value should be used as an indicator that throughput has exceeded the provisioned quota.
If the traffic is excessive, the service has the following behavior:
You might see consumers not getting any records and constantly rebalancing. In this scenario, consumers don't get any records and constantly rebalance. There's no exception or error when it happens, but the Kafka logs will show that the consumers are stuck trying to rejoin the group and assign partitions. There are a few possible causes:
request.timeout.ms
is at least the recommended value of 60000 and your session.timeout.ms
is at least the recommended value of 30000. Having these settings too low could cause consumer time-outs, which then cause rebalances (which then cause more time-outs, which cause more rebalancing, and so on)Event Hubs for Kafka currently support only gzip
compression algorithm. If any other algorithm is used, client applications see a message-format version error (for example, The message format version on the broker does not support the request.
).
If an unsupported compression algorithm needs to be used, compressing your data with that specific algorithm before sending it to the brokers and decompressing after receiving is a valid workaround. The message body is just a byte array to the service, so client-side compression/decompression won't cause any issues.
UnknownServerExceptionYou might receive an UnknownServerException from Kafka client libraries similar to the following example:
org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request
Open a ticket with Microsoft support. Debug-level logging and exception timestamps in UTC are helpful in debugging the issue.
Other issuesCheck the following items if you see issues when using Kafka on Event Hubs.
Apache Kafka vs. Event Hubs Kafka. For the most part, Azure Event Hubs' Kafka interface has the same defaults, properties, error codes, and general behavior that Apache Kafka does. The instances that these two explicitly differ (or where Event Hubs imposes a limit that Kafka doesn't) are listed here:
group.id
property is 256 charactersoffset.metadata.max.bytes
is 1,024 bytesTo learn more about Event Hubs and Event Hubs for Kafka, see the following articles:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4