How to support snappy compression after aiokafka 0.9.0?

66 Views Asked by At

Our server app is using snappy compression to send message over kafka. This has no problem with aiokafka 0.8.1. Recently we upgraded aiokafka version to 0.10.0, it suddenly gave us error "UnsupportedCodecError('Libraries for snappy compression codec not found')".

We checked the release notes and found that snappy was removed since 0.9.0. But we have to support snappy compression because that's the default compression type used by the server and the server is not controlled by our group.

What should I do in order to support snappy compression now?

1

There are 1 best solutions below

0
On

Got reply from aiokafka folks: snappy compression is still supported. But now it uses other dependency library for its implementation. Nothing is needed to change if you install aiokafka with proper extras (pip install 'aiokafka[snappy]' or pip install 'aiokafka[all]').