def publish(queue, payload = {})
      # Check queue name includes in the configured list
      # Return if queue doesn't exist
      if queue_list.include? queue
        # Publish sms to queue
        begin
          x_direct.publish(
            payload.to_json,
            mandatory: true,
            routing_key: get_queue(queue).name
          )
          log_message("Publish status: success, Queue : #{queue}, Content : #{payload}")
          :success
        rescue => ex
          log_message("Publish error:#{ex.message}")
          :error
        end
      else
        log_message("Publish status: failed, Queue(#{queue}) doesn't exist.")
        log_message("Content : #{payload}")
        raise QueueNotFoundError
      end
    end
def publish(queue, payload = {})
      # Check queue name includes in the configured list
      # Return if queue doesn't exist
      if queue_list.include? queue
        # Publish sms to queue
        begin
          x_direct.publish(
            payload.to_json,
            mandatory: true,
            routing_key: get_queue(queue).name
          )
          log_message("Publish status: success, Queue : #{queue}, Content : #{payload}")
          :success
        rescue => ex
          log_message("Publish error:#{ex.message}")
          :error
        end
      else
        log_message("Publish status: failed, Queue(#{queue}) doesn't exist.")
        log_message("Content : #{payload}")
        raise QueueNotFoundError
      end
    end
Initialize
 Instance methods
 Publish message to the respective queue