broker-game / git-broker-client

A Slow Event Messaging/Streaming client using Git for educational purposes
Apache License 2.0
1 stars 0 forks source link

Add options for batchReceive #106

Open jabrena opened 4 years ago

jabrena commented 4 years ago
Consumer consumer = client.newConsumer()
        .topic("my-topic")
        .subscriptionName("my-subscription")
        .batchReceivePolicy(BatchReceivePolicy.builder()
             .maxNumMessages(100)
             .maxNumBytes(1024 * 1024)
             .timeout(200, TimeUnit.MILLISECONDS)
             .build())
        .subscribe();