Skip to content

Instantly share code, notes, and snippets.

@pingles
Created December 18, 2012 13:04
Show Gist options
  • Save pingles/4327837 to your computer and use it in GitHub Desktop.
Save pingles/4327837 to your computer and use it in GitHub Desktop.
(let [[message-seq put] (pipe)]
(letfn [(message-handler [ch msg-meta payload])
(put {:ch ch :msg-meta msg-meta :payload payload})]
(lc/subscribe ch qname message-handler :auto-ack true))
message-seq)
@ebaxt
Copy link

ebaxt commented Jan 11, 2013

Shouldn't the put form be part of the message-handler function? Or am I missing something?

(let [[message-seq put] (pipe)]
  (letfn [(message-handler [ch msg-meta payload]
            (put {:ch ch :msg-meta msg-meta :payload payload}))]
    (lc/subscribe ch qname message-handler :auto-ack true))
  message-seq)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment