[
https://issues.apache.org/jira/browse/ARTEMIS-1025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15947087#comment-15947087
]
ASF GitHub Bot commented on ARTEMIS-1025:
-----------------------------------------
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1119#discussion_r108671820
--- 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 --
What was the issue with LinkedList? Why using an ArrayList instead?
> OutOfDirectMemoryError raised from Netty
> ----------------------------------------
>
> Key: ARTEMIS-1025
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1025
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
>
> If you send and receive a lot of messages in short time to Artemis via Netty
> connector, the OutOfDirectMemoryError exception is thrown from the client.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)