confluentinc / bottledwater-pg

Change data capture from PostgreSQL into Kafka
http://blog.confluent.io/2015/04/23/bottled-water-real-time-integration-of-postgresql-and-kafka/
Apache License 2.0
3 stars 149 forks source link

Unbreak build if Avro is older than 1.8 #109

Closed samstokes closed 8 years ago

samstokes commented 8 years ago

PR #102 added a call to avro_schema_namespace in order to include the Postgres schema name (which we transport via the Avro schema namespace) in the generated Kafka topic for a table.

Unfortunately, avro_schema_namespace was added somewhat recently to avro-c and is not present in avro-c releases before 1.8.0.

Since packages are hard to come by for Avro 1.8.0+, this PR restores compatibility with Avro 1.7 (dropping the schema from the topic name in that case, and generating a build warning). /cc @mcapitanio

Tested with avro-c 1.8.0 (as downloaded by Dockerfile.build) and 1.7.7.