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
version: "3" | |
services: | |
guac-postgres: | |
container_name: guac-postgres | |
image: postgres | |
environment: | |
- POSTGRES_PASSWORD=blahblahblah | |
volumes: | |
- home/fred/Projects/Guacamole/init-scripts:/docker-entrypoint-initdb.d |
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
core.cljs | |
--------- | |
(ns om-async.core | |
(:require-macros [cljs.core.async.macros :refer [go]]) | |
(:require [cljs.core.async :as async :refer [put! chan alts!]] | |
[goog.dom :as gdom] | |
[om.core :as om :include-macros true] | |
[om.dom :as dom :include-macros true] | |
[om-sync.core :refer [om-sync]] | |
[om-sync.util :refer [tx-tag edn-xhr]])) |
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
If you want to connect to your rabbit node via the Erlang REPL then you can start another node in the REPL like this - | |
erl -sname test -setcookie "ERLANGCOOKIE" | |
then try - | |
net_adm:ping('rabbit@hostname'). | |
If it returns 'pong' then you're in business, but if you see 'pang' returned then you have not managed to reach your rabbit node. |
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
require 'bunny' | |
conn = Bunny.new | |
conn.start | |
ch = conn.create_channel | |
x = ch.direct('hello-exchange', :durable => true) | |
q = ch.queue('hello-queue', :durable => true).bind(x, :routing_key => 'hola') |
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
Publisher | |
--------- | |
require 'bunny' | |
conn = Bunny.new | |
conn.start | |
ch = conn.channel | |
ch.confirm_select |
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
conn = Bunny.new(:keepalive => true) |
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
conn = Bunny.new(:heartbeat => 30) | |
# or | |
conn = Bunny.new(:heartbeat_interval => 30) | |
# or | |
conn = Bunny.new(:requested_heartbeat => 30) |
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
q = b.queue('testq', :arguments => {"x-message-ttl" => 60000}) # messages are deemed dead after 60 secs |
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
q.publish('test message', :expiration => "60000") # message will reside in queue maximum 1 minute |
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
q = b.queue('testq', :arguments => {"x-expires" => 120000}) # idle queue expires after 2 mins |
NewerOlder