Skip to content

Commit

Permalink
NIFI-13729 Remove deprecated property MAX_RECV_THREAD_POOL_SIZE from …
Browse files Browse the repository at this point in the history
…ListenTCP

This closes #9248.

Signed-off-by: Peter Turcsanyi <[email protected]>
  • Loading branch information
EndzeitBegins authored and turcsanyip committed Sep 9, 2024
1 parent 61aeb7a commit 657e75c
Showing 1 changed file with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.apache.nifi.event.transport.netty.ByteArrayMessageNettyEventServerFactory;
import org.apache.nifi.event.transport.netty.NettyEventServerFactory;
import org.apache.nifi.flowfile.FlowFile;
import org.apache.nifi.migration.PropertyConfiguration;
import org.apache.nifi.processor.AbstractProcessor;
import org.apache.nifi.processor.DataUnit;
import org.apache.nifi.processor.ProcessContext;
Expand Down Expand Up @@ -112,16 +113,6 @@ public class ListenTCP extends AbstractProcessor {
.defaultValue(ClientAuth.REQUIRED.name())
.build();

// Deprecated
public static final PropertyDescriptor MAX_RECV_THREAD_POOL_SIZE = new PropertyDescriptor.Builder()
.name("max-receiving-threads")
.displayName("Max Number of Receiving Message Handler Threads")
.description(
"This property is deprecated and no longer used.")
.addValidator(StandardValidators.createLongValidator(1, 65535, true))
.required(false)
.build();

protected static final PropertyDescriptor POOL_RECV_BUFFERS = new PropertyDescriptor.Builder()
.name("pool-receive-buffers")
.displayName("Pool Receive Buffers")
Expand Down Expand Up @@ -152,8 +143,6 @@ public class ListenTCP extends AbstractProcessor {
ListenerProperties.MAX_BATCH_SIZE,
ListenerProperties.MESSAGE_DELIMITER,
IDLE_CONNECTION_TIMEOUT,
// Deprecated
MAX_RECV_THREAD_POOL_SIZE,
POOL_RECV_BUFFERS,
SSL_CONTEXT_SERVICE,
CLIENT_AUTH
Expand All @@ -177,6 +166,11 @@ public class ListenTCP extends AbstractProcessor {
protected volatile byte[] messageDemarcatorBytes;
protected volatile EventBatcher<ByteArrayMessage> eventBatcher;

@Override
public void migrateProperties(PropertyConfiguration config) {
config.removeProperty("max-receiving-threads");
}

@OnScheduled
public void onScheduled(ProcessContext context) throws IOException {
int workerThreads = context.getProperty(ListenerProperties.WORKER_THREADS).asInteger();
Expand Down

0 comments on commit 657e75c

Please sign in to comment.