Skip to content
View gist:7306ba8add96f0dcebfe
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]]))
View gist:4550692
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.
View gist:4512337
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')
View gist:4500579
Publisher
---------
require 'bunny'
conn = Bunny.new
conn.start
ch = conn.channel
ch.confirm_select
View gist:4253043
conn = Bunny.new(:keepalive => true)
View gist:4253037
conn = Bunny.new(:heartbeat => 30)
# or
conn = Bunny.new(:heartbeat_interval => 30)
# or
conn = Bunny.new(:requested_heartbeat => 30)
View gist:4247233
q = b.queue('testq', :arguments => {"x-message-ttl" => 60000}) # messages are deemed dead after 60 secs
View gist:4247204
q.publish('test message', :expiration => "60000") # message will reside in queue maximum 1 minute
View gist:4247130
q = b.queue('testq', :arguments => {"x-expires" => 120000}) # idle queue expires after 2 mins
View gist:4241084
# /etc/rabbitmq/rabbitmq.config
#
# Follow the instructions on RabbitMQ website to create certificate authority and certificates -
#
# http://www.rabbitmq.com/ssl.html
#
[
{rabbit, [
{tcp_listeners,[{"127.0.0.1",5672}]},
Something went wrong with that request. Please try again.