Code Monkey home page Code Monkey logo

rabbitmq-easynetq-communication's Introduction

Rabbitmq + Easynetq Communication for Microservices

Communication over RabbitMQ instance using EasynetQ for .NET and other platform's AMQP protocol implementations.

About

EasyNetQ is a very simple RabbitMQ client API avaialble for .NET focusing on the simlicity. This library simplicity is achieved through their own naming convention. Which means all the queue, exchange names, bindings, etc. all are handled by the library. When comes to .NET microservices this library is very simple to use, when all the .NET projects are shared common library for EventBus message formats. But when comes to different projects with not shared common message format library or communicating with different AMQP libraries, such as .NET Core 3 to Node.js or .NET Core 3 to .NET Framework MVC, I've come accoross that this default convention is not usable considering below reasons.

  1. Queue naming covention - Since easynetq provide it's own queue name based the message "Class name, Namespace", it's hard to specify exact queue name when communicate with another AMQP protocol library. Ex: .NET Core + EasyNetQ -> Node.JS + amqplib.
  2. Serialization & Deserialization - EasynetQ use fully qualified assembly name during serialization and deserialization of messages. This is problematic when sending messages from another AMQP protocol library to EasyNeqQ library. Ex: Node + Amqplib to .NET + EasynetQ.

This repository mainly for the usage of EasyNetQ libraries concerning given considerations. This repository covers below communication patterns of EasyNetQ library.

  1. Send/Receive pattern
  2. RPC (Remote Procedure Call) pattern

How to Build

  1. Run docker-compose up -d --buil to run the RabbitMQ instance configured with 2 queues as test.communication.queue - for Send/Receive example and payment.validity.check.queue for RPC example.
  2. Build Node.js project using npm install command on the root of the project folder named Node

Examples

  1. Send/Receive style projects - You can find configuration file named EventBusTypeNameSerializer.cs file which override default full qualified assembly name convention. Examples to try:
    1. .NET Core to .NET Core - Run DotnetCore.Receiver and DotnetCore.Sender projects
    2. .NET Core to Node.Js - Run NodeJS/sendreceive_receiver.js and DotnetCore.Sender projects
    3. Node.Js to .NET Core - Run DotnetCore.Receiver and NodeJS/sendreceive_sender.js projects
  2. RPC style projects - You can find configuration file named EventBusTypeNameSerializer.cs file which override default full qualified assembly name convention and EventBusConventions.cs file which use the QueueAttribute queue name instead of default queue name convention.
    1. .NET Core to .NET Core - Run DotnetCore.Rpc.Responder and DotnetCore.Rpc.Requester projects
    2. .NET Core to Node.Js - Run NodeJS/rpc_responder.js and DotnetCore.Rpc.Requester projects

Things TODO:

  1. .NET EasyNetQ to RabbitMQ Java Client communication
  2. .NET EasyNetQ to RabbitMQ Python Client communication

rabbitmq-easynetq-communication's People

Contributors

dhjayasinghe avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.