1
- // Copyright (c) 2023 Broadcom. All Rights Reserved.
1
+ // Copyright (c) 2023-2024 Broadcom. All Rights Reserved.
2
2
// The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
3
3
//
4
4
// This software, the RabbitMQ Stream Java client library, is dual-licensed under the
@@ -120,13 +120,14 @@ static ConsumerFlowStrategy creditOnChunkArrival() {
120
120
*
121
121
* @param initialCredits number of initial credits
122
122
* @return flow strategy
123
+ * @see com.rabbitmq.stream.ConsumerBuilder.FlowConfiguration#initialCredits(int)
123
124
*/
124
125
static ConsumerFlowStrategy creditOnChunkArrival (int initialCredits ) {
125
126
return new CreditOnChunkArrivalConsumerFlowStrategy (initialCredits );
126
127
}
127
128
128
129
/**
129
- * Strategy that provides 1 initial credit and a credit when half of the chunk messages are
130
+ * Strategy that provides 10 initial credits and a credit when half of the chunk messages are
130
131
* processed.
131
132
*
132
133
* <p>Make sure to call {@link MessageHandler.Context#processed()} on every message when using
@@ -135,7 +136,7 @@ static ConsumerFlowStrategy creditOnChunkArrival(int initialCredits) {
135
136
* @return flow strategy
136
137
*/
137
138
static ConsumerFlowStrategy creditWhenHalfMessagesProcessed () {
138
- return creditOnProcessedMessageCount (1 , 0.5 );
139
+ return creditOnProcessedMessageCount (10 , 0.5 );
139
140
}
140
141
141
142
/**
@@ -147,6 +148,7 @@ static ConsumerFlowStrategy creditWhenHalfMessagesProcessed() {
147
148
*
148
149
* @param initialCredits number of initial credits
149
150
* @return flow strategy
151
+ * @see com.rabbitmq.stream.ConsumerBuilder.FlowConfiguration#initialCredits(int)
150
152
*/
151
153
static ConsumerFlowStrategy creditWhenHalfMessagesProcessed (int initialCredits ) {
152
154
return creditOnProcessedMessageCount (initialCredits , 0.5 );
0 commit comments