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

    https://github.com/apache/activemq-artemis/pull/690#discussion_r73322300
  
    --- Diff: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/plug/ProtonSessionIntegrationCallback.java
 ---
    @@ -351,18 +353,35 @@ public void serverSend(final Receiver receiver,
           recoverContext();
     
           PagingStore store = 
manager.getServer().getPagingManager().getPageStore(message.getAddress());
    -      if (store.isFull() && store.getAddressFullMessagePolicy() == 
AddressFullMessagePolicy.BLOCK) {
    -         ErrorCondition ec = new 
ErrorCondition(AmqpError.RESOURCE_LIMIT_EXCEEDED, "Address is full: " + 
message.getAddress());
    -         Rejected rejected = new Rejected();
    -         rejected.setError(ec);
    -         delivery.disposition(rejected);
    -         connection.flush();
    +      if (store.isRejectingMessages()) {
    +         // We drop pre-settled messages (and abort any associated Tx)
    +         if (delivery.remotelySettled()) {
    +            if (serverSession.getCurrentTransaction() != null) {
    +               rollbackCurrentTX(false);
    +
    +               // Spec requires closure of coordinator link on rejection 
of presettled messages within a tx
    --- End diff --
    
    It requires either closing the coordinator link, or that you reject 
attempts to discharge the transaction that don't have fail=true (i.e fail 
commit attempts, allow rollback attempts).
    
    I'd personally go for the second option as its the simpler for 
clients/applications to deal with, and since the use of pre-settled transfers 
mean its highly possible the client will have already sent everything and 
attempted to commit the transaction before it ever sees the coordinator link 
closure so there will be little difference between the two options from the 
brokers perspective.


---
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