Skip to content

Commit

Permalink
Merge pull request #535 from mgrenonville/add-batch-receive-policy
Browse files Browse the repository at this point in the history
Add batchReceivePolicy configuration in consumer config
  • Loading branch information
judu authored Dec 7, 2023
2 parents ee13db1 + a913ed0 commit 49fbd6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ case class ConsumerConfig(subscriptionName: Subscription,
enableBatchIndexAcknowledgement: Option[Boolean] = None,
additionalProperties: Map[String, AnyRef] = Map.empty,
deadLetterPolicy: Option[DeadLetterPolicy] = None,
replicateSubscriptionState: Boolean = false)
replicateSubscriptionState: Boolean = false,
batchReceivePolicy: Option[BatchReceivePolicy] = None)

Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ class DefaultPulsarClient(client: org.apache.pulsar.client.api.PulsarClient) ext
config.ackTimeoutTickTime.foreach { tt => builder.ackTimeoutTickTime(tt._1, tt._2) }
config.enableBatchIndexAcknowledgement.foreach { enabled => builder.enableBatchIndexAcknowledgment(enabled) }
config.deadLetterPolicy.foreach(builder.deadLetterPolicy)
config.batchReceivePolicy.foreach(builder.batchReceivePolicy)
config.acknowledgmentGroupTime.foreach { gt => builder.acknowledgmentGroupTime(gt._1, gt._2) }
if (config.topics.nonEmpty)
builder.topics(config.topics.map(_.name).asJava)
Expand Down

0 comments on commit 49fbd6d

Please sign in to comment.