Created
November 1, 2012 12:04
-
-
Save mavnn/3993268 to your computer and use it in GitHub Desktop.
EasyNetQ on F#
This file contains hidden or 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
module Program | |
open EasyNetQ | |
type MyMessage = { Message : string } | |
let bus = RabbitHutch.CreateBus("host=192.168.56.1") | |
bus.Subscribe<MyMessage>("FSharpTest", fun mesg -> printfn "%A" mesg.Message) | |
bus.Publish({ Message = "Hello world"}) | |
// Output is: | |
""" | |
DEBUG: Trying to connect | |
INFO: Connected to RabbitMQ. Broker: '192.168.56.1', VHost: '/' | |
DEBUG: Published Program+MyMessage:EasyNetQFSharp, CorrelationId 95f352f1-e689-481f-bc89-52b33ffae7ba | |
DEBUG: Subscriber Recieved Program+MyMessage:EasyNetQFSharp, CorrelationId 95f352f1-e689-481f-bc89-52b33ffae7ba | |
"Hello world" | |
""" |> ignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment