This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Throttling with circuit breaking in Camel  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to open circuit of a route until the aggregate batch transfer is complete?

I have checked Camel's route policy, but this works for a number of inflight exchanges. Also, I checked RouteBuilder's source code but looks like there is no such option.

I have the following route:



Now my use case is that I want to transfer 500 messages between these routes, and I use .throttle(500). But I also want to control that when the next batch of 500 messages should be routed. I want to route the next 500 messages only when the queue a2 becomes empty.

For example, messages are getting routed from queue a1 to a2. Say 500 messages have been routed successfully, now I want to suspend (or open circuit) of my route so that it won't transfer messages any further until the queue a2 becomes empty (there is a consumer which is pulling messages from queue a2)

Is there a way to achieve this in Apache Camel?
 
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!