Due to a coding error in
instances of AMQPSerializer<*> are not being added to this cache:
This is because the lambda argument for getOrPut() executes a return statement before the result can be added to the map.
The same coding error also exists in:
However, in this case the serializersByTypeId cache is being populated anyway by the makeAndCache() function and so we can replace getOrPut() by getOrElse() to make this behaviour explicit.