Thursday, June 14, 2012

Programmatically create RabbitMQ Exchange and Queue with Burrow.NET

- As mentioned in previous posts, IRouteFinder is an interface defined in Burrow.NET to help publishing the message to correct target. If you have many message types, potentially you will need many exchanges and queues. And if it's true, setup everything for different environments or different machines is not an interesting task. So with...

Wednesday, June 13, 2012

How I Mock Mongo Collection?

- I have been working with Mongo quite alot recently and writing my service classes using mongo without testing is such a pain in the neck. So today, I'll post about how I mock mongo collection for my unit testings. - Given that I have a ReminderService like below: public class ReminderService { private readonly MongoCollection<User>...

Wednesday, June 6, 2012

Save a little time when writing unit test using VS.NET Macro

- As a unit testing passioner, I write a lot of unit tests for my code. But repeating adding test attributes to classes and methods, adding resharper ignore InconsistentNaming statement or adding AAA pattern are killing me. So I thought of making some awesome macros to save my time. - Basically, when I add a test class, the file will originaly...

Sunday, June 3, 2012

Things you can easily change in Burrow.NET

- As I said in other posts, Burrow.NET aims to generic needs of any .NET projects that use RabbitMQ. I believe the built-in code has covered most of your requirements for common usages. However there are some things you can easily change without writing any new code or at least just a few lines of code. So in this post, I'll introduce...

Custom Burrow.NET TunnelFactory & RabbitMQ

I/ Default TunnelFactory - When using Burrow.NET, one of the important thing to create is a Tunnel by using TunnelFactory: var tunnel = RabbitTunnel.Factory.Create(); - The Factory static property of RabbitTunnel keeps a default instance of TunnelFactory class. The TunnelFactory has 4 overloads to create the ITunnel object: public...