Skip to content

Instantly share code, notes, and snippets.

@obohrer
Created May 14, 2019 18:13
Show Gist options
  • Save obohrer/a6ce492adb2464a30f1bea2599684236 to your computer and use it in GitHub Desktop.
Save obohrer/a6ce492adb2464a30f1bea2599684236 to your computer and use it in GitHub Desktop.
Snippets to access Darwin feed v16 (Camel + ActiveMQ)
(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