def consume(self, routingKey, msg):
        """
        Consumer for this (CaptureData) class. Gets the data sent from yieldMetricsValue and
        sends it to the storage backends.
        """
        build_data = msg['build_data']
        builder_info = yield self.master.data.get(("builders", build_data['builderid']))

        if self._builder_name_matches(builder_info) and self._data_name == msg['data_name']:
            try:
                ret_val = self._callback(msg['post_data'])
            except Exception as e:
                raise CaptureCallbackError("CaptureData failed for build %s of builder %s."
                                           " Exception generated: %s with message %s"
                                           % (build_data['number'], builder_info['name'],
                                              type(e).__name__, str(e)))
            post_data = ret_val
            series_name = '%s-%s' % (builder_info['name'], self._data_name)
            context = self._defaultContext(build_data, builder_info['name'])
            yield self._store(post_data, series_name, context)