Skip to content

Initiative to implement a modular framework of integration patterns, as proposed by Gregor Hohpe and Bobby Woolf in the "Enterprise Integration Patterns" book, in .Net Framewok's style 🚀.

License

Notifications You must be signed in to change notification settings

rodrigo-speller/IntegrationFramework

Repository files navigation

.Net Speller Integration Framework

The Integration Framework ia an initiative to implement a modular framework of integration patterns, as proposed by Gregor Hohpe and Bobby Woolf in the Enterprise Integration Patterns book.

The concern of this project is to maintain a collaborative development of a complete framework that abstracts and simplifies the concrete concepts of key application integration technologies through the definitions and the vocabulary of the Enterprise Integration Patterns book.

In an microservice architeture, we need to integrate service communication with one or more integration buses. These buses can be deployed in a variety of different technologies, as well as services. We are working on the challenge of developing a framework that does not limit the use of the target technologies. We uses only the available features in the target technology, avoiding hacks that can result in a coupled component. That way, we can work on a side-by-side architeture with no side effects. For example, in RabbitMQ modules, we don't limit the messaging topology.

Get the Integration Framework

The quickest way to get the latest release of the Integration Framework is to add it to your project using NuGet:

Module Package name Latest version
RabbitMQ Publish/Subscribe Speller.IntegrationFramework.RabbitMQ NuGet
RabbitMQ Request/Reply Speller.IntegrationFramework.RabbitMQ.RequestReply NuGet

Samples

Simple RabbitMQ "Hello World" sample code

In the sender application, resolve the channel and publish message to hello-queue:

public static async Task SayHelloWorld()
{
    services.GetService<IRabbitMQChannel>();

    var message = "Hello World!";
    
    await channel.Publish("hello-queue", message);
}

In the receiver application, declare a message handler to subscribe the message queue hello-queue:

[Subscribe("hello-queue")]
[AcknowledgeMode(AcknowledgeMode.Automatic)]
public class Receiver : IMessageHandler<RabbitMQDelivery>
{
    public Task Handle(RabbitMQDelivery message)
    {
        var content = message.AsString();

        Console.WriteLine($"Received: {content}");

        return Task.CompletedTask;
    }
}

To see a complete Sender/Receiver sample, go to the "Hello World" RabbitMQ sample code.

RabbitMQ Sample Projects

Follows the samples list to the RabbitMQ and RabbitMQ.RequestReply packages usage.

Sample Description Patterns
Hello World Sending and receiving text messages through a queue. Point-to-Point Channel, Document Message
Work queues Distributing tasks to workers. Competing Consumers, Command Message
Publish/Subscribe Sending messages to many consumers at once. Publish-Subscribe Channel, Event Message
Routing Receiving messages selectively. Selective Consumer, Message Router, Event Message
Topics Receiving messages based on a pattern (topics). Selective Consumer, Message Router, Event Message
Request/Reply RPC/RPI communication. Remote Procedure Invocation, Request-Reply, Command Message, Document Message, Correlation Identifier, Return Address

Bug Reports

If you found any bug, please report them using the GitHub issue tracker.

License

This software is licensed under the Apache License, Version 2.0 (see LICENSE).

Copyright

Copyright (c) Rodrigo Speller. All rights reserved.

About

Initiative to implement a modular framework of integration patterns, as proposed by Gregor Hohpe and Bobby Woolf in the "Enterprise Integration Patterns" book, in .Net Framewok's style 🚀.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages