Re: [akka-user] Apply different functions on SubFlows

2017-04-26 Thread Vishal John
add(Flow.fromFunction((n: Int) => n + 100)) > val processOdd = builder.add(Flow.fromFunction((n: Int) => n - 1)) > > partition.out(0) ~> processEven ~> merge.in(0) > partition.out(1) ~> processOdd ~> merge.in(1) > > FlowShape(partition.in, merge.out) &g

[akka-user] Apply different functions on SubFlows

2017-03-21 Thread Vishal John
Hello all, I have defined my application flow like this, *val flow = Flow[StringConsumerRecord].* * map(tup => new Ticket(tup.value.toLong)).* * mapConcat(applyBusinessLogic(_)).* * groupBy(4, _._1).* * groupedWithin(100, 5.second).* * mergeSubstreams.* * throttle(1, 1.second, 1,

[akka-user] Suspending akka stream for a predefined time and then start again.

2017-03-16 Thread Vishal John
Hello all, I have a application which reads a stream of "request" messages, process them and makes API calls to Zendesk. Zendesk has a limit of 10 api call/second. And if you hit the rate limit by any change then you will have to wait for a specific interval of time which will be returned