(ns rabbitmq.tutorials.emit-log-direct
  (:require [langohr.core :as lc]
            [langohr.channel :as lch]
            [langohr.exchange :as le]
            [langohr.basic :as lb]
            [clojure.string :as s]))

(def ^{:const true} x "direct_logs")

(defn -main
  [severity & args]
  (with-open [conn (lc/connect)]
    (let [ch      (lch/open conn)
          payload (if (empty? args)
                    "Hello, world!"
                    (s/join " " args))]
      (le/direct ch x :durable false :auto-delete false)
      (lb/publish ch x severity payload)
      (println (format " [x] Sent %s" payload)))))

(ns rabbitmq.tutorials.emit-log-direct
  (:require [langohr.core :as lc]
            [langohr.channel :as lch]
            [langohr.exchange :as le]
            [langohr.basic :as lb]
            [clojure.string :as s]))

(def ^{:const true} x "direct_logs")

(defn -main
  [severity & args]
  (with-open [conn (lc/connect)]
    (let [ch      (lch/open conn)
          severity (or severity "info")
          payload  (if (empty? args)
                     "Hello, world!"
                     (s/join " " args))]
      (le/direct ch x :durable false :auto-delete false)
      (lb/publish ch x severity payload)
      (println (format " [x] Sent %s" payload)))))

Use the same default as Ruby example
Use the same default as Ruby example

anhzhi/rabbitmq-tutorials,borna2exl/rabbitmq-tutorials,girirajsharma/rabbitmq-tutorials,thoven78/rabbitmq-tutorials,bwong199/rabbitmq-tutorials,hangshiisi/rabbitmq-tutorials,SaiNadh001/rabbitmq-tutorials,yepesasecas/rabbitmq-tutorials,fengjx/rabbitmq-tutorials,jonahglover/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,SaiNadh001/rabbitmq-tutorials,girirajsharma/rabbitmq-tutorials,SaiNadh001/rabbitmq-tutorials,mixmar91/rabbitmq,rabbitmq/rabbitmq-tutorials,yepesasecas/rabbitmq-tutorials,jonahglover/rabbitmq-tutorials,thoven78/rabbitmq-tutorials,jonahglover/rabbitmq-tutorials,fengjx/rabbitmq-tutorials,girirajsharma/rabbitmq-tutorials,SaiNadh001/rabbitmq-tutorials,Dim0N22/rabbitmq-tutorials,tkssharma/rabbitmq-tutorials,bwong199/rabbitmq-tutorials,hangshiisi/rabbitmq-tutorials,yepesasecas/rabbitmq-tutorials,Dim0N22/rabbitmq-tutorials,thoven78/rabbitmq-tutorials,AlexandrT/rabbitmq-tutorials,girirajsharma/rabbitmq-tutorials,youyesun/rabbitmq-tutorials,yhiguchi/rabbitmq-tutorials,girirajsharma/rabbitmq-tutorials,youyesun/rabbitmq-tutorials,SaiNadh001/rabbitmq-tutorials,AlexandrT/rabbitmq-tutorials,thoven78/rabbitmq-tutorials,AlexandrT/rabbitmq-tutorials,tkssharma/rabbitmq-tutorials,youyesun/rabbitmq-tutorials,AlexandrT/rabbitmq-tutorials,borna2exl/rabbitmq-tutorials,Dim0N22/rabbitmq-tutorials,yepesasecas/rabbitmq-tutorials,hangshiisi/rabbitmq-tutorials,mixmar91/rabbitmq,Dim0N22/rabbitmq-tutorials,SaiNadh001/rabbitmq-tutorials,yhiguchi/rabbitmq-tutorials,Dim0N22/rabbitmq-tutorials,jonahglover/rabbitmq-tutorials,jonahglover/rabbitmq-tutorials,borna2exl/rabbitmq-tutorials,tkssharma/rabbitmq-tutorials,borna2exl/rabbitmq-tutorials,tkssharma/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,youyesun/rabbitmq-tutorials,anhzhi/rabbitmq-tutorials,yhiguchi/rabbitmq-tutorials,fengjx/rabbitmq-tutorials,hangshiisi/rabbitmq-tutorials,anhzhi/rabbitmq-tutorials,mixmar91/rabbitmq,rabbitmq/rabbitmq-tutorials,girirajsharma/rabbitmq-tutorials,yhiguchi/rabbitmq-tutorials,borna2exl/rabbitmq-tutorials,girirajsharma/rabbitmq-tutorials,fengjx/rabbitmq-tutorials,fengjx/rabbitmq-tutorials,borna2exl/rabbitmq-tutorials,yepesasecas/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,bwong199/rabbitmq-tutorials,thoven78/rabbitmq-tutorials,AlexandrT/rabbitmq-tutorials,thoven78/rabbitmq-tutorials,anhzhi/rabbitmq-tutorials,Dim0N22/rabbitmq-tutorials,mixmar91/rabbitmq,jonahglover/rabbitmq-tutorials,Dim0N22/rabbitmq-tutorials,tkssharma/rabbitmq-tutorials,bwong199/rabbitmq-tutorials,AlexandrT/rabbitmq-tutorials,yepesasecas/rabbitmq-tutorials,bwong199/rabbitmq-tutorials,mixmar91/rabbitmq,mixmar91/rabbitmq,AlexandrT/rabbitmq-tutorials,jonahglover/rabbitmq-tutorials,Dim0N22/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,youyesun/rabbitmq-tutorials,hangshiisi/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,tkssharma/rabbitmq-tutorials,youyesun/rabbitmq-tutorials,fams/rabbitmq-tutorials,bwong199/rabbitmq-tutorials,mixmar91/rabbitmq,anhzhi/rabbitmq-tutorials,thoven78/rabbitmq-tutorials,mixmar91/rabbitmq,hangshiisi/rabbitmq-tutorials,borna2exl/rabbitmq-tutorials,yepesasecas/rabbitmq-tutorials,fams/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,Dim0N22/rabbitmq-tutorials,fams/rabbitmq-tutorials,AlexandrT/rabbitmq-tutorials,fams/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,yhiguchi/rabbitmq-tutorials,anhzhi/rabbitmq-tutorials,bwong199/rabbitmq-tutorials,anhzhi/rabbitmq-tutorials,yepesasecas/rabbitmq-tutorials,tkssharma/rabbitmq-tutorials,yhiguchi/rabbitmq-tutorials,tkssharma/rabbitmq-tutorials,girirajsharma/rabbitmq-tutorials,SaiNadh001/rabbitmq-tutorials,SaiNadh001/rabbitmq-tutorials,anhzhi/rabbitmq-tutorials,hangshiisi/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,jonahglover/rabbitmq-tutorials,girirajsharma/rabbitmq-tutorials,bwong199/rabbitmq-tutorials,jonahglover/rabbitmq-tutorials,SaiNadh001/rabbitmq-tutorials,hangshiisi/rabbitmq-tutorials,fengjx/rabbitmq-tutorials,thoven78/rabbitmq-tutorials,fams/rabbitmq-tutorials,fengjx/rabbitmq-tutorials,borna2exl/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,AlexandrT/rabbitmq-tutorials,youyesun/rabbitmq-tutorials,youyesun/rabbitmq-tutorials,yepesasecas/rabbitmq-tutorials,rabbitmq/rabbitmq-tutorials,yhiguchi/rabbitmq-tutorials,fengjx/rabbitmq-tutorials,borna2exl/rabbitmq-tutorials,mixmar91/rabbitmq,fams/rabbitmq-tutorials,anhzhi/rabbitmq-tutorials,bwong199/rabbitmq-tutorials,fams/rabbitmq-tutorials,yhiguchi/rabbitmq-tutorials,fams/rabbitmq-tutorials,tkssharma/rabbitmq-tutorials,fams/rabbitmq-tutorials