code: def publish(self, message_type, message_payload):
          
          payload = json.dumps(jsonpickle.Pickler(unpicklable=False).flatten(message_payload))
          message = amqp.Message(payload)
          message.properties["delivery_mode"] = 2
  
          name = 'majormode.%s.%s.%s' % (settings.ENVIRONMENT_STAGE, self.service_name.lower(), message_type.lower())
  
          self.channel.queue_declare(queue=name, durable=True, exclusive=False, auto_delete=False)
          self.channel.exchange_declare(exchange=name, type="direct", durable=True, auto_delete=False,)
          self.channel.queue_bind(queue=name, exchange=name, routing_key=name)
  
          self.channel.basic_publish(message, exchange=name, routing_key=name)
docs: Publish the specified object that the function automatically converts
          into a JSON string representation.
  
          This function use the lowered class name of the service as the AMQP
          routing key.  For instance, if the class ``ExampleService`` inherits
          from the base class ``BaseService``, the methods of an instance of
          this class will publish messages using the routing key named
          ``exampleservice``.
  
          @param message_type: string representing the type of the event, more
                 likely ``on_something_happened`.
          @param message_payload: an object to convert into a JSON string
                 representation and to publish.