Discussion
· Apr 11

Routers: Best practices for multiple operations

Hello 

We are pretty new to Ensemble and we are considering on using a default setup for our production. Let me explain the situation. We have one sender that sends HL7 ADT messages to our system. We have 60+ other systems that need to recieve ADT messages. We where thinking on a few ways on how to do the setup. 

Setup1:

We create one big ADTRouter that contains a first mapping. The result is send to another big ADTRouter that contains all the filters/expressions and mappings for the recieving systems. These' are the Pro's and Cons from my point of view I could be very wrong so please help me out here to know if I'm correct:

Pro's

- Not to much database overhead.

- I'm not sure but will this be performant?

Con's

- Not very maintainable.

-Could be slow and not performant?

 

Setup2

We still create on big router with one first mapping. But instead we send the result to 60+ other routers with their own filters/expressions, and mappings.

the pro's and con's from my point of view:

Pro's

- Very maintainable.

-I think it's faster then setup 1 but I'm not sure?

Con's

- A lot of database overhead

- Or could be slower then setup1? I'm not sure.

 

For maintenance I would prefer setup2 but I'm not sure on how this wil affect the database? And if this most performant way? And what the effect will be if we keep adding other routers? And advice would be very helpfull. 

Thanks in advance

Discussion (4)2
Log in or sign up to continue

Setup 2 is my preferrable option for a few reasons:

  1. If I need to pause messaging to a specific endpoint and replay a few messages, I can pause the traffic at the Router and then work with the Operation without impacting the traffic to the other endpoints.
  2. If a receiving systems flow needs to pass through a more complex process that is synchronous, I can enforce the synchronicity at that systems router/process again without any impact on the other messaging flows.
  3. Any Errors returned from an Operation to the Router are sent only to that systems specific router
  4. System specific transformations and routing rules can be held within the system specific router and not in one mega-router.

So in effect, I would suggest something like:

Any common transforms you need to apply can then go in at the System A router (for example, I had a system with a bug in the outputs we would get, so worked around it once earlier in the flow rather than trying to fix it in every transform for the downstream systems).

Beyond that, I'd recommend the routing rules in the System A router is minimal but still apply a base level of filtering based on the message types the downstream routers will be receiving. There no point sending System D A04 messages if that router then will never process them. However, if System D will receive A08's when PV1:2 is "E", I'd allow all A08's from System A's Router to go to System D's router, and then do the explicit check for A08's when PV1:2 is "E" from within the rules of System D's Router.