code-attic / Symbiote

Open source framework for distributed application development
http://www.sharplearningcurve.com/wiki/Symbiote-Main.ashx
Other
32 stars 5 forks source link

Examples of Jackalope #2

Open kriswill opened 14 years ago

kriswill commented 14 years ago

I'm currently using the .net RabbitMQ.Client natively, however I would love to see some examples or spec tests for this in your library. Bonus points for using Rx!

arobson commented 14 years ago

Kriswill,

There are some really simple examples of Jackalope as publisher and subscriber projects under the demo solution folder in Symbiote.

I have have more for you to look at in the near-ish future and will update you. In the meantime, keep in mind that there are two primary means to subscribe to messages:

Implement IMessageHandler, Jackalope will scan your assembly to find these and auto-wire them up so that as messages of TMessage are dequeued from RabbitMQ, Jackalope instantiates the corresponding handlers, passes them the message and then disposes of them once the process is complete.

The other approach is to use Bus.QueueStreams["queueName"] to get access to an IObservable for all messages arriving off the queue. The envelope contains the message and an IMessageDelivery interface; the latter is used to Acknowledge the message.

If you have other questions, feel free to e-mail me: asrobson AT gmail DOT com.

Hope you find it useful!

Alex