Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
Moved timeout config to start method
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon McGloin committed Oct 4, 2016
1 parent da13da6 commit 594247e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class NakadiActorPublisher(consumerAndProps: ReactiveNakadiConsumer, leaseManage
private val client: ActorRef = consumerAndProps.nakadiClient
private var streamSupervisor: Option[ActorRef] = None
private val reconnectTimeout: Duration = consumerAndProps.properties.batchFlushTimeoutInSeconds * 1.5
context.setReceiveTimeout(reconnectTimeout)

private val MaxBufferSize = 100
private var buf = Vector.empty[StringConsumerMessage]

Expand Down Expand Up @@ -129,6 +127,7 @@ class NakadiActorPublisher(consumerAndProps: ReactiveNakadiConsumer, leaseManage

def start() = {
if (!isRunning) {
context.setReceiveTimeout(reconnectTimeout)
isRunning = true
client ! ConsumeCommand.Start
}
Expand Down

0 comments on commit 594247e

Please sign in to comment.