Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add loopback channel to direct local messages to endpoints
  • Loading branch information
clayton committed Aug 28, 2017
1 parent 8beb5ba commit 4cf85af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project.clj
@@ -1,4 +1,4 @@
(defproject de.mpg.shh/util-message-server "0.0.12"
(defproject de.mpg.shh/util-message-server "0.0.13"
:description "Interop with hornetq"
:url "http://www.shh.mpg.de/"
:license {:name "Eclipse Public License"
Expand Down
Expand Up @@ -49,10 +49,12 @@
:as message-server} :message-server
dispatcher-request-transducer :dispatcher-request-transducer
end-points :end-points
loopback-channel :loopback-channel
:as component}]
(let [dispatcher-request-channel (async/chan dispatcher-request-buffer-size dispatcher-request-transducer)
_ (life-cycle/listen message-server listen-context-config listen-address dispatcher-request-channel listen-selector)]
(async/go-loop [dispatcher-request (async/<! dispatcher-request-channel)]
_ (life-cycle/listen message-server listen-context-config listen-address dispatcher-request-channel listen-selector)
dispatcher-request-merge-channel (async/merge (remove nil? [dispatcher-request-channel loopback-channel]))]
(async/go-loop [dispatcher-request (async/<! dispatcher-request-merge-channel)]
(if (dispatch request-channel end-points dispatcher-request)
(recur (async/<! dispatcher-request-channel))
(info "Shutdown dispatcher request channel")))
Expand Down

0 comments on commit 4cf85af

Please sign in to comment.