Coder Social home page Coder Social logo

marinazhyga / rabbitmqsummit2021 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5.45 MB

Masstransit with fanout and direct exchanges

C# 100.00%
fanoutexchange directexchange federation shovel masstransit direct edge-devices fanout rabbitmq rabbitmq-consumer

rabbitmqsummit2021's Introduction

RabbitMqSummit2021

This solution contains two approaches how to route data between edges.

The first approach represents a producer that publishes to a fanout exchange, dedicated to a certain edge.

Steps on how to run the demo solution:

  1. Configuration of a cloud RabbitMq instance would require to
  • Create vhost "demo".
  • Give permission to this vhost.
  • No additional plugins are needed.
  1. Upload source code and navigate to -> Fanout folder of the solution.
  2. Configuration of an edge RabbitMq instance would require to
  • Create vhost "demo".
  • Give permission to this vhost.
  • Enable federation and federation_management plugins.
  • Create federation upstream to cloud from 1.
  • Create policy with pattern ^(edge(uniqueId))$ to federate exchanges only. Examples of policies for different edges ^(edge1)$, ^(edge2)$, ^(edgeN)$
  1. Run RabbitMqSummit2021.EdgeFanout with a proper appsettings.json pointing to the edge RabbitMq instance.
  2. Exchanges and queues will be created on the edge RabbitMq as well as the cloud RabbitMq.
  3. Run RabbitMqSummit2021.CloudFanout with a proper appsettings.json pointing to the cloud RabbitMq instance.
  4. Input the id of the edge to what message should be delivered. The identifier should be equal to the already configured edge RabbitMq.

The second approach represents a producer that publishes to a direct exchange, where a routing key is a unique edge identifier.

Steps on how to run the demo solution:

  1. Expand -> Direct folder of the solution.
  2. Run RabbitMqSummit2021.CloudDirect with a proper appsettings.json pointing to the cloud RabbitMq cluster.
  3. Run RabbitMqSummit2021.EdgeDirect with a proper appsettings.json pointing to the edge RabbitMq instance.

rabbitmqsummit2021's People

Contributors

marinazhyga avatar

Watchers

 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.