Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

A POC of how should we handle streaming content based routers such as apikit or RossetaNet

Notifications You must be signed in to change notification settings

mulesoft-labs/new-hope-routers-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This example shows how we should handle live streaming routers such as Apikit 2.0 and RosettaNet.

This example is generic and meant to built on.

Basically there's a route operation and a route listener. They both share a common routeKey:

The connector verifies that:

  • For every routeKey in a route operation there's ONE and ONLY ONE listener with that key
  • For every listener, there's AT LEAST ONE route operation with a matching key
  • No two listeners with the same key.

Listeners and sources register themselves through an intermediary RoutingManager. The RoutingManager passes messages back and forth.

Pay speciall attention to the RoutingContext implemented in the Source. There's some special magic in there to make sure that streams generated in the listener flow are not closed until the routing flow is finished. This is the most important part of it all!

There's a test case which does some basic assertions, the most important part of the test are the log messages.

About

A POC of how should we handle streaming content based routers such as apikit or RossetaNet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages