Use custom serializer for aggregation messages when the data type is int/double.