RE: Throttling from direct to bean

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

RE: Throttling from direct to bean

Please disregard, the issue was with the bindings in the Rabbit exchanges.
Feeling silly now, apologies for the spam.


From: Valdis Andersons
Sent: 02 July 2019 18:06
To: [hidden email]
Subject: Throttling from direct to bean

Hi All,

Would anyone know if this is possible to do with the Camel Throttler? Here is the routing:

--- from AbstractRouteBuilder---

                                  .process(exchange ->
                                                                                exchange.getIn().setHeader("rabbitmq.DELIVERY_MODE", 2);


--- from a concrete Route Builder implementation that extends the AbstractRouteBuilder---

                   .log("Receiving on throttled route ${body}")

The throttle is needed here in order to prevent the messageProcessingBean to overwhelm a web service endpoint that it's calling. The requests tend to be rather big and the WS is quite slow.

What I'm seeing at the moment with the above is that my rabbitmq consumers have been stopped after the first message has gone through but after the 15sec time period nothing has started up again, so no more messages are coming through. Is the above config not suited to what I want to do with the routes or am I missing something here? If not I can just have a route builder that doesn't use the AbstractRouteBuilder it'd just mean I have to set the delivery mode header in the concrete route builder.