Skip to content

Commit f7d3e9e

Browse files
committed
Deprecate public constructor in ImmutableReactiveMessageConsumerSpec
This commit deprecates the current public constructor with all fields in favor of a package-protected variant. The constructor was initially added to support Jackson serde but it did not need to be public. Resolves #221
1 parent 2330863 commit f7d3e9e

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/api/ImmutableReactiveMessageConsumerSpec.java

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,68 @@ public ImmutableReactiveMessageConsumerSpec(ReactiveMessageConsumerSpec consumer
191191
this.expireTimeOfIncompleteChunkedMessage = consumerSpec.getExpireTimeOfIncompleteChunkedMessage();
192192
}
193193

194+
/**
195+
* Constructs an instance with the specified parameters.
196+
*
197+
* @deprecated since 0.7.0 for removal in 0.9.0 in favor of {@link #ImmutableReactiveMessageConsumerSpec(List, Pattern, RegexSubscriptionMode, Duration, String, SubscriptionMode, SubscriptionType, SubscriptionInitialPosition, KeySharedPolicy, Boolean, Map, String, Map, Integer, Boolean, Boolean, Duration, Duration, Duration, Boolean, Scheduler, Duration, RedeliveryBackoff, RedeliveryBackoff, DeadLetterPolicy, Boolean, Integer, Integer, Boolean, Duration, CryptoKeyReader, ConsumerCryptoFailureAction, Integer, Boolean, Duration)}
198+
*/
199+
@Deprecated
194200
public ImmutableReactiveMessageConsumerSpec(List<String> topicNames, Pattern topicsPattern,
201+
RegexSubscriptionMode topicsPatternSubscriptionMode, Duration topicsPatternAutoDiscoveryPeriod,
202+
String subscriptionName, SubscriptionMode subscriptionMode, SubscriptionType subscriptionType,
203+
SubscriptionInitialPosition subscriptionInitialPosition, KeySharedPolicy keySharedPolicy,
204+
Boolean replicateSubscriptionState, Map<String, String> subscriptionProperties, String consumerName,
205+
Map<String, String> properties, Integer priorityLevel, Boolean readCompacted, Boolean batchIndexAckEnabled,
206+
Duration ackTimeout, Duration ackTimeoutTickTime, Duration acknowledgementsGroupTime,
207+
Boolean acknowledgeAsynchronously, Scheduler acknowledgeScheduler, Duration negativeAckRedeliveryDelay,
208+
DeadLetterPolicy deadLetterPolicy, Boolean retryLetterTopicEnable, Integer receiverQueueSize,
209+
Integer maxTotalReceiverQueueSizeAcrossPartitions, Boolean autoUpdatePartitions,
210+
Duration autoUpdatePartitionsInterval, CryptoKeyReader cryptoKeyReader,
211+
ConsumerCryptoFailureAction cryptoFailureAction, Integer maxPendingChunkedMessage,
212+
Boolean autoAckOldestChunkedMessageOnQueueFull, Duration expireTimeOfIncompleteChunkedMessage) {
213+
this.topicNames = topicNames;
214+
this.topicsPattern = topicsPattern;
215+
this.topicsPatternSubscriptionMode = topicsPatternSubscriptionMode;
216+
this.topicsPatternAutoDiscoveryPeriod = topicsPatternAutoDiscoveryPeriod;
217+
this.subscriptionName = subscriptionName;
218+
this.subscriptionMode = subscriptionMode;
219+
this.subscriptionType = subscriptionType;
220+
this.subscriptionInitialPosition = subscriptionInitialPosition;
221+
this.keySharedPolicy = keySharedPolicy;
222+
this.replicateSubscriptionState = replicateSubscriptionState;
223+
this.subscriptionProperties = subscriptionProperties;
224+
this.consumerName = consumerName;
225+
this.properties = properties;
226+
this.priorityLevel = priorityLevel;
227+
this.readCompacted = readCompacted;
228+
this.batchIndexAckEnabled = batchIndexAckEnabled;
229+
this.ackTimeout = ackTimeout;
230+
this.ackTimeoutTickTime = ackTimeoutTickTime;
231+
this.acknowledgementsGroupTime = acknowledgementsGroupTime;
232+
this.acknowledgeAsynchronously = acknowledgeAsynchronously;
233+
this.acknowledgeScheduler = acknowledgeScheduler;
234+
this.negativeAckRedeliveryDelay = negativeAckRedeliveryDelay;
235+
this.negativeAckRedeliveryBackoff = null;
236+
this.ackTimeoutRedeliveryBackoff = null;
237+
this.deadLetterPolicy = deadLetterPolicy;
238+
this.retryLetterTopicEnable = retryLetterTopicEnable;
239+
this.receiverQueueSize = receiverQueueSize;
240+
this.maxTotalReceiverQueueSizeAcrossPartitions = maxTotalReceiverQueueSizeAcrossPartitions;
241+
this.autoUpdatePartitions = autoUpdatePartitions;
242+
this.autoUpdatePartitionsInterval = autoUpdatePartitionsInterval;
243+
this.cryptoKeyReader = cryptoKeyReader;
244+
this.cryptoFailureAction = cryptoFailureAction;
245+
this.maxPendingChunkedMessage = maxPendingChunkedMessage;
246+
this.autoAckOldestChunkedMessageOnQueueFull = autoAckOldestChunkedMessageOnQueueFull;
247+
this.expireTimeOfIncompleteChunkedMessage = expireTimeOfIncompleteChunkedMessage;
248+
}
249+
250+
/**
251+
* Constructs an instance with the specified parameters. Intended for use by the
252+
* Jackson mixin for the Jackson serde.
253+
*/
254+
@SuppressWarnings("unused")
255+
ImmutableReactiveMessageConsumerSpec(List<String> topicNames, Pattern topicsPattern,
195256
RegexSubscriptionMode topicsPatternSubscriptionMode, Duration topicsPatternAutoDiscoveryPeriod,
196257
String subscriptionName, SubscriptionMode subscriptionMode, SubscriptionType subscriptionType,
197258
SubscriptionInitialPosition subscriptionInitialPosition, KeySharedPolicy keySharedPolicy,

0 commit comments

Comments
 (0)