Git Product home page Git Product logo

activator-reactive-kafka-scala's Introduction

activator-reactive-kafka-scala's People

Contributors

kciesielski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

activator-reactive-kafka-scala's Issues

consumer processing records very slowly

Hi, its not a issue, i followed your Git repository and trying to implement same for my project, (my stack is reactive mongo and playframework) ,in your code you created consumers using (Consumer.committableSource), i also did the same, but the problem is i need to re-process around 40 lakh to 50 lakh records, but it takes more time( nearly 1 day). and the problem is when i see the cpu percentages , my analytics is using very less cpu percentage.

my code is:
testConsumer.create("testconsumer")(context.system)
.groupedWithin(batchSize, batchAwaitTime milliseconds)
.mapAsync(incidentParallelism)({ records =>
//logger.warn("batch size for Incidents is " + records.size)
var offsetBatch = CommittableOffsetBatch.empty
val incidentList = records map { eachRecord =>
offsetBatch = offsetBatch.updated(eachRecord.committableOffset)
Json.parse(eachRecord.record.value()).as[IncidentModel]
}
Future.sequence(processRecords(incidentList.toList, isIncidentsNeedsProcessing)).map { _ =>
offsetBatch
}
})
.mapAsync(2)(_.commitScaladsl())
.runWith(Sink.ignore) recover {
case e: Exception => logger.warn(" Exception occurred in actor " + e)
}

my consumer configuration is :

akka.kafka.consumer {

poll-interval = 50ms
poll-timeout = 2s
stop-timeout = 30s

close-timeout = 100s
commit-timeout = 100s

wakeup-timeout = 3s

max-wakeups = 10

use-dispatcher = "akka.kafka.default-dispatcher"

kafka-clients {
enable.auto.commit = false

heartbeat.interval.ms = 1500

session.timeout.ms = 10000

max.poll.records = 500

}
}
iam trying hard to know the mistake i did. help me !!!

https://github.com/softwaremill/activator-reactive-kafka-scala/blob/master/app/reactivekafka/LoggingConsumer.scala#L23-L32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.