-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Aggregator in Ocelot: Requires At Least Two Routes to Execute #1941
Comments
Hi @camilocalderont ! Hope it helps! |
@ggnaegi Oh, no! |
Ouch... |
@RaynaldM @ggnaegi If not joking... Do we accept it? |
@camilocalderont Dear Camilo, |
if @camilocalderont wants to do it himself, why not? |
Hi, @RaynaldM, @raman-m, I greatly appreciate your attention to my case. I'm a big fan of Ocelot and use it daily as an orchestrator service and even as an entry point. Your alternative is very good, but in my case, I use a class to organize and dynamically change the host and port. Therefore, it was better for me to use Aggregators instead of Controllers, as it would duplicate an endpoint that is already in another .Net project being orchestrated. Thus, I had to use an Aggregator and define 2 routes, but only use the first one. It would be nice to not have that restriction. |
Sounds like a life hack! 🤣 You are true Ocelot fan! 😉 @ggnaegi Your opinion? VotingTotal 2.5 negative of 3 |
@raman-m @camilocalderont @RaynaldM By design, if only one route, then when don't make any further checks and process the downstream request. It's a bit straight forward, but that's the way it is at the moment. The problem is probably that the Aggregator has been placed at the wrong spot in the multiplexer and we are mixing concerns. From my side I would prefer moving the Aggregator somewhere else in the pipeline, renaming it, and calling it ResponseTransform instead. |
@ggnaegi Your vote is negative, right? ➖ |
@camilocalderont
We will be glad to review your open PRs in future! |
Expected Behavior / New Feature
Aggregators in Ocelot should execute correctly when configured with a single route, allowing modifications to the response as per the aggregator's logic.
Actual Behavior / Motivation for New Feature
The aggregator does not execute when it is configured with only one route. Instead, the request seems to be handled by another route with a wildcard, and the response from the microservice is returned without any modifications by the aggregator.
Steps to Reproduce the Problem
Specifications
Docs
The text was updated successfully, but these errors were encountered: