Created
May 14, 2019 18:13
-
-
Save obohrer/a6ce492adb2464a30f1bea2599684236 to your computer and use it in GitHub Desktop.
Snippets to access Darwin feed v16 (Camel + ActiveMQ)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import 'org.apache.activemq.camel.component.ActiveMQComponent) | |
... | |
(defn- ^String activemq-source-path | |
[{:keys [user password broker-url topic] :as consumer-config}] | |
(format "activemq:topic:%s?username=%s&password=%s" | |
topic | |
user | |
password)) | |
(defn activemq-component | |
[config] | |
(ActiveMQComponent/activeMQComponent (get-in config [:broker-url]))) | |
;; cfg | |
(def cfg {:topic "darwin.pushport-v16", | |
:user "DARWIN-FOOBAR-UUID", | |
:password nil, ;; FIXME | |
:broker-url "tcp://darwin-dist-44ae45.nationalrail.co.uk:61616?jms.watchTopicAdvisories=false"}) | |
(.. builder | |
(from (activemq-source-path cfg))) | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment