padcom / grails-routing

Apache License 2.0
30 stars 31 forks source link

Routing Policy doesn't seem to work #51

Open anixan opened 8 years ago

anixan commented 8 years ago

Hi,

So I found another way to get a policy setup as shown below.

However when testing I was expecting to see the output in the console which i didn't.

I suspect that the policy isn't being attached properly, any ideas?

@Override
    void configure() {
        def config = grailsApplication?.config

        //Throttler Policy
        ThrottlingInflightRoutePolicy policy = new ThrottlingInflightRoutePolicy()
        policy.setMaxInflightExchanges(20)
        policy.setResumePercentOfMax(10)
        policy.setLoggingLevel(LoggingLevel.WARN)

        from("seda:input.queue").routePolicy(policy).to("seda:process.history")
        from("seda:input.queue.batch").routePolicy(policy).to("seda:process.history")

from("seda:process.history").to("bean:testService?method=showMsg")

    }

Thanks in advance