Skip to content

Instantly share code, notes, and snippets.

@AlainODea
Created December 8, 2013 01:28
Show Gist options
  • Save AlainODea/7852276 to your computer and use it in GitHub Desktop.
Save AlainODea/7852276 to your computer and use it in GitHub Desktop.
Haskell AMQP with TLS Support
#!/usr/bin/env bash
git clone [email protected]:AlainODea-haskell/amqp.git
git clone [email protected]:vincenthz/hs-connection.git
git clone [email protected]:vincenthz/hs-tls.git
git clone git://github.com/haskell/cabal.git
pushd cabal
cabal install Cabal/ cabal-install/
export PATH=~/.cabal/bin:$PATH
popd
pushd hs-connection
git checkout dev
git reset --hard 289d72bf63
popd
push hs-tls
git reset --hard ab1b6ead7b
popd
pushd amqp
git checkout TLS_Support
cabal configure
cabal sandbox init
cabal sandbox add-source ../hs-tls/core
cabal sandbox add-source ../hs-tls/extra
cabal sandbox add-source ../hs-tls/debug
cabal sandbox add-source ../hs-connection
cabal install --only-dependencies
cabal build
# test consumer: ./dist/build/consumer-tls/consumer-tls
# test producer: ./dist/build/producer-tls/producer-tls
@AlainODea
Copy link
Author

Easiest way to consume this:

mkdir sandbox
curl -O https://gist.github.com/AlainODea/7852276/raw/a6f8221a1bf6306bfc4719b7f5f4152d5e528018/haskell_amqp_tls.sh
chmod +x haskell_amqp_tls.sh
./haskell_amqp_tls.sh
cd amqp
./dist/build/consumer-tls/consumer-tls

Open a second console:

./dist/build/producer-tls/producer-tls

On the first console you should see:

received from DE: hallo welt
received from EN: hello world

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment