rabbitmq-tutorials/common-lisp/emit-log.lisp
2016-03-02 04:57:43 -08:00

17 lines
340 B
Bash
Executable File

#!/bin/sh
sbcl --noinform --noprint $@ <<EOF
(ql:quickload :cl-bunny.examples)
(in-package :cl-bunny.examples)
(with-connection ("amqp://")
(with-channel ()
(let ((msg (format nil "~{~a~^ ~}" (cdr sb-ext:*posix-argv*)))
(x (exchange.fanout "logs")))
(publish x msg)
(format t " [x] Sent '~a'~%" msg))))
EOF