Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77523234
--- Diff:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage
message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean
direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice
other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() &&
pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception =
ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
There are only two possible solutions:
i - block the connection, which would end up also blocking consumers on the
same connection. (by setting readable to false on the Netty Connection)
ii - fail like I'm doing.
I chosen ii as it would also endup killing the connection due to TTL or
anything else.
Dropping is not acceptable as it would silently fail. The user would
believe a message was sent which would endup lost. It's a bigger risk we can't
measure.
When the user configure it as DROP he's saying he can afford a lost, we
can't measure that and we couldn't do such thing here.
---
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.
---