Darius X.
Darius X.

Reputation: 2937

Throttling on a direct route

Trying to understand how throttling work is two consumers lead to a direct consumer that does some work and then sends a transformed message onward.

I can specify throttle on each consumer, but if the intent is not to overwhelm the destination, can I apply throttle to the direct route?

More importantly, would it act just as if it is throttling the 2 consumers, or would it consume and potentially create a "build up" of messages between the initial routes and the direct route?

Maybe, instead of direct it has to be seda?

Follow-up question: Can the throttled messages be flushed out if a graceful-shutdown begins?

Throttling a direct route

Upvotes: 0

Views: 442

Answers (1)

TacheDeChoco
TacheDeChoco

Reputation: 3913

There is a nice example here corresponding to your problem - in this case, a JMS consumer + a file consumer, both sending to a same seda endpoint.

You will notice that a single throttling policy is defined, and that each consumer is referring to this policy, so that the final destination is not overwhelmed.

Hope this helps.

Upvotes: 2

Related Questions