Hi I am using apache camel timer component in my route. I need to change the period polling interval dynamically. I have a business method which will return some time interval and it will be different depending on logic. I have to pass this to Timer so that my timer should poll according to this interval. I don't want to start and stop the route with new interval as its performance hit.
I want one timer route for which period has to be set dynamically.
The timer cannot be changed at runtime, as its using the JDK java.util.Timer which cannot be changed.
You can use camel-quartz which allows changing the scheduler at runtime, which you can do using JMX. There is also a Quartz plugin in hawtio - http://hawt.io/plugins/quartz/ - that allows you to change the scheduler using a web UI.
Related
Let's say, There is dynamic configuration are stored in a DB to filter blacklisted events from the stream.
A filter function uses this configuration and needs to reload/refresh a new configuration after a time interval(10 min).
A function can be called in every window call to reload the config and reassign the config variable.
NOTE: As this function call in a window is independent of stream's events data so don't want to buffer/hold the stream events in memory till the window is triggered.
Any leads?
You could put a ProcessFunction in front of the window, and have it do the filtering. I'm suggesting a ProcessFunction because it can have a timer that fires every 10 minutes to trigger the reload/refresh of the configuration data.
In this way, all of the events that reach the window will have been pre-filtered by the version of the droplist configuration that was active at the time each event was received.
You could take further advantage of streaming, and stream in the changes to the droplist configuration as they occur, rather than polling for them every 10 minutes.
In our application we are calling every minute to our feature flags service using angular therefore browser.waitForAngular() always fail.
is there a way to use browser.waitForAngular() and make it ignore this specific feature flag call (API call that is being called every 60 secs) so we can still use the wait for angular and not implement waits on the code?
There is an option to enable/disable waitForAngular which may be used to disable for pages where polling is happening and enabled again later for other pages..Check the below link
browser.waitForAngularEnabled
We are rebuilding an existing JSP web application using AngularJS. In our existing application we use the page load time metrics extensively.
With the SPA there are no real page load times. How can we track user experience of performance through GA in this scenario?
If you want to know how long something takes you can use User Timings - this somewhat resembles event tracking, only you pass a duration as value parameter (i.e. you need to start a timer when your thing starts, stop if when it's ready and the time measured is the value for the user timing):
ga('send', {
hitType: 'timing',
timingCategory: 'SPA Content change',
timingVar: 'load',
timingValue: 100
});
I am developing a countdown timer app. User can register the app and share their own countdown timer; However, I have a problem here, how to let all user synchronize the same countdown timer?
I use Angular and NodeJS + MongoDB to develop this app.
My problem is the countdown timer is running by angularjs that only one user can see the running timer, but other people can't. Should I update every second number in database and query it every second or running timer in the backend?
any suggestion ?
I'd do it this way: When the timable action occurs server-side, store both the start time and the end time in the database. Upon page load, both numbers get pulled to the client, which figures out the delta and starts its own local countdown. The GUI can optionally show the server-side end time, which is the "time of record."
Is there a way to build Camel routes that starts in suspended mode?
I'm looking so to say "declutch" at start up, then at some stage quickly start processing messages by just calling resumeRoute(routeId)
I could perhaps just create the route and then quickly call suspendRoute(routeId), after the route has been created, but at that stage, it would probably have consumed some messages (for instance in the case of JMS routes or polling consumer routes).
generally, you'd just disable the route by using autostartup(false)...
I assume you are asking though because you need the route started (warmed), but not active. In that case, then you should be able to use a custom route policy and some external variable to get this behavior