def _on_message_safe(self, request, message): try: return self._on_message(request, message) except Exception as e: # Wrap exception into another exception for compability with oslo. self.publish_message(exc.KombuException(e), message.properties['reply_to'], message.properties['correlation_id'], res_type='error') finally: message.ack()
def _on_message_safe(self, request, message): try: return self._on_message(request, message) except Exception as e: LOG.warning( "Got exception while consuming message. Exception would be " "send back to the caller.") LOG.debug("Exceptions: %s" % str(e)) # Wrap exception into another exception for compability with oslo. self.publish_message(exc.KombuException(e), message.properties['reply_to'], message.properties['correlation_id'], res_type='error') finally: message.ack()