This project is read-only.
Project Description
Lightweight Asynchronous Messaging Framework for MSMQ.

Asynchronous Messaging is a form of loosely coupled distributed communication, where in this context the term 'communication' can be understood as an exchange of messages between software components. Message-oriented technologies attempt to relax tightly coupled communication (such as TCP network sockets, CORBA or RMI) by the introduction of an intermediary component, which in this case would be a queue. The latter approach allows software components to communicate 'indirectly' with each other. Benefits of this include message senders not needing to have precise knowledge of their receivers, since communication is performed using the queue.

The Asynchronous Messaging (Justa.Messaging) framework is an API that simplifies the programming model for asynchronous messaging. At the core is a generics based messaging gateway API surrounded by asynchronous messaging patterns e.g., Content Based Router, Splitter, Aggregator, Message Filter, Recipient List, Dynamic Router, Sequencer, etc.

Asynchronous Messaging (Abel Perez)

Justa Messaging is a Generics based Asynchronous Messaging Framework.

note: the following examples use a sample request and response queue. Destination queues can be any queue registered in MSMQ and in scenarios where the queue does not exist in MSMQ the MessageGateway will dynamically create them.

Example: Sends and Receives an object, in this case a string.
  MessageGateway<object> gateway = new MessageGateway<object>("some.request.queue");
  gateway.Send("Object Message Test");
  object response = gateway.Receive("some.response.queue");

Example: Sends and Receives a String.
  MessageGateway<String> gateway = new MessageGateway<String>("some.request.queue");
  gateway.Send("String Message Test");
  String response = gateway.Receive("some.response.queue");

Example: Sends and Receives an XmlDocument.
  XmlDocument xml = new XmlDocument();
  xml.LoadXml("<?xml version=\"1.0\"?><Message><Test>Xml Document Test</Test></Message>");

  MessageGateway<XmlDocument> gateway = new MessageGateway<XmlDocument>("some.request.queue");
  XmlDocument response = gateway.Receive("some.response.queue");

Example: Sends and Receives a custom object (MockMessage).
  MessageGateway<MockMessage> gateway = new MessageGateway<MockMessage>("some.request.queue");
  gateway.Send(new MockMessage("Custom Type Test"));
  MockMessage response = gateway.Receive("some.response.queue");

Example: Receives generic type message asynchronously.
  MessageGateway<MockMessage> gateway = new MessageGateway<MockMessage>("some.response.queue");
  gateway.OnMessageReceived += ReceiveMessage;
  // delegate method that receives generic type message asynchronously.
  public void ReceiveMessage(MockMessage message)
    Console.WriteLine("received async: {0}.", message.Name);

Justa.Messaging is also collection of Enterprise Messaging patterns.

Content Based Router

The Content-Based Router examines the message content and routes the message onto a different channel based on data contained in the message. The routing can be based on a number of criteria such as existence of fields, specific field values etc. When implementing a Content-Based Router, special caution should be taken to make the routing function easy to maintain as the router can become a point of frequent maintenance. In more sophisticated integration scenarios, the Content-Based Router can take on the form of a configurable rules engine that computes the destination channel based on a set of configurable rules. Content Based Router


The Splitter can be used to split a message that consists of several items into smaller messages that need to be processed by a target consumer. A common example use case for a Splitter is an Order Processing System. The Order system would send an order message that consist of many line items to the Splitter. The Splitter would then create a smaller message for each line item in the order and send each message to the target consumer. Splitter

Dynamic Router

comming soon Justa.Messaging.DynamicRouter.

Recipient List Router

comming soon Justa.Messaging.RecipientListRouter


comming soon Justa.Messaging.Joiner


comming soon Justa.Messaging.Aggregator

Process Manager

comming soon Justa.Messaging.ProcessManager

Message Gateway

comming soon Justa.Messaging.MessageGateway

Command Message

Command Message follows the Command Message pattern as decribed in the Enterprise Integration Patterns book.
More documentation comming soon Justa.Messaging.CommandMessage

Message Filter

comming soon Justa.Messaging.Filter

Message Resequencer

comming soon Justa.Messaging.Resequencer

You can learn more about messaging at Asynchronous Messaging

Last edited Apr 16, 2011 at 7:23 AM by aperez, version 20