Github user franz1981 commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1119#discussion_r108835826
  
    --- Diff: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
 ---
    @@ -45,40 +43,37 @@
     
     public class NettyConnection implements Connection {
     
    -   // Constants -----------------------------------------------------
    -   private static final int BATCHING_BUFFER_SIZE = 8192;
    -
    -   // Attributes ----------------------------------------------------
    +   private static final int DEFAULT_MTU_BYTES = 
Integer.getInteger("io.netty.mtu", 1460);
    +   //backpressure on unbatched writes is enabled by default
    +   private static final boolean ENABLED_RELAXED_BACK_PRESSURE = 
!Boolean.getBoolean("io.netty.disable.backpressure");
    +   //it is the limit while waiting the data to be flushed and alerting (if 
in trace mode) the event
    +   private static final long DEFAULT_BACK_PRESSURE_WAIT_MILLIS = 
Long.getLong("io.netty.backpressure.millis", 1_000L);
    +   //if not specified the default batch size will be equal to the 
ChannelConfig::writeBufferHighWaterMark
    +   private static final int DEFAULT_BATCH_BYTES = 
Integer.getInteger("io.netty.batch.bytes", Integer.MAX_VALUE);
    +   private static final int DEFAULT_WAIT_MILLIS = 10_000;
     
        protected final Channel channel;
    -
    -   private boolean closed;
    -
        private final BaseConnectionLifeCycleListener listener;
    -
    -   private final boolean batchingEnabled;
    -
        private final boolean directDeliver;
    -
    -   private volatile ActiveMQBuffer batchBuffer;
    -
        private final Map<String, Object> configuration;
    -
    -   private final Semaphore writeLock = new Semaphore(1);
    -
    -   private RemotingConnection protocolConnection;
    -
    -   private boolean ready = true;
    -
        /**
         * if {@link #isWritable(ReadyListener)} returns false, we add a 
callback
         * here for when the connection (or Netty Channel) becomes available 
again.
         */
    -   private final Deque<ReadyListener> readyListeners = new LinkedList<>();
    +   private final List<ReadyListener> readyListeners = new ArrayList<>();
    --- End diff --
    
    It has a better locality than the linked one and is simpler to manage for 
any kind of garbage collector


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to