While writing some message retry logic, we discovered that it's not safe to perform operations like (update-in metadata [:headers :field-here] f) because when no headers are present, the field is a java.util.Collections$EmptyMap. This type isn't associative so clojure functions like assoc/update throw exceptions when dealing with it.
While writing some message retry logic, we discovered that it's not safe to perform operations like
(update-in metadata [:headers :field-here] f)because when no headers are present, the field is ajava.util.Collections$EmptyMap. This type isn't associative so clojure functions likeassoc/updatethrow exceptions when dealing with it.