Skip to content

Files

Latest commit

13652ae · Jan 23, 2018

History

History
This branch is 801 commits behind rabbitmq/rabbitmq-tutorials:main.

haskell

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jan 23, 2018
Dec 16, 2016
Dec 16, 2016
Dec 16, 2016
Dec 16, 2016
Dec 16, 2016
Dec 16, 2016
Dec 16, 2016
Dec 16, 2016
Jan 23, 2018
Jan 23, 2018
Dec 16, 2016
Dec 16, 2016

Haskell code for RabbitMQ tutorials

Here you can find Haskell code examples from RabbitMQ tutorials.

Requirements

To run this code you need Network.AMQP.

Running the examples with stack

  1. Install stack.
  2. Run the scripts via stack FILE ARGS instead of runhaskell FILE ARGS. (This installs ghc, plus amqp and other required packages for you.)

Code

Code examples are executed via runhaskell:

Tutorial one: "Hello World!":

runhaskell send.hs
runhaskell receive.hs

Tutorial two: Work Queues:

runhaskell newTask.hs hello world
runhaskell worker.hs

Tutorial three: Publish/Subscribe

runhaskell receiveLogs.hs
runhaskell emitLog.hs hello world

Tutorial four: Routing

runhaskell receiveLogsDirect.hs info warn
runhaskell emitLogDirect.hs warn "a warning"

Tutorial five: Topics

runhaskell receiveLogsTopic.hs info warn
runhaskell emitLogTopic.hs warn "a warning"

Tutorial six: RPC

runhaskell rpcServer.hs
runhaskell rpcClient.hs

To learn more, see Network.AMQP.