code: def alarm():
      
      if request.method == 'POST':
          response = {'message': 'POST Accepted'}
          logging.info('alarm POSTED!')
          data = request.data
          logging.info(data)
          string = json.dumps(data)
          producer.send('SIP-alarms', string.encode())
          return response
      return ""
docs: .