[ 
https://issues.apache.org/jira/browse/ARTEMIS-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16408030#comment-16408030
 ] 

ASF GitHub Bot commented on ARTEMIS-406:
----------------------------------------

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

    https://github.com/apache/activemq-artemis/pull/1960#discussion_r176109013
  
    --- Diff: 
artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompTransaction.java
 ---
    @@ -0,0 +1,82 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements. See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License. You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.activemq.artemis.core.protocol.stomp;
    +
    +import org.apache.activemq.artemis.api.core.Message;
    +import org.apache.activemq.artemis.core.server.ServerSession;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +/**
    + * Control's stomp transaction processing
    + * it goes with stomp connections.
    + * it stores acks, sends, nacks
    + * during commit it applies those to core sessions.
    + * because each stomp connection uses only one session
    + * we can't rely on core session to manage multiple
    + * tx's.
    + */
    +public class StompTransaction {
    +
    +   private List<StompAck> acks = new ArrayList<>();
    --- End diff --
    
    Transactions in Artemis are usually done right away...
    
    The operation on the journal is stored right away... then a pending commit 
is in place.
    
    the thing that if you duplicate Transaction functionality from the session, 
you won't inherit other features such as timeouts.. etc...
    
    
    If you need to support this, I would do it properly.. even if it requires 
some light refactoring on how transactions are stored. (I believe you could use 
the XID to get the transaction.. as a matter of fact the previous version had 
some code before such as manager.getTransactionI()).
    
    
    later on when users complain about a timed out transactions, you will have 
a better chance of implementing through the ResourceManager that is already in 
place.


> STOMP acknowledgements should support transactions
> --------------------------------------------------
>
>                 Key: ARTEMIS-406
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-406
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: STOMP
>            Reporter: Lionel Cons
>            Assignee: Howard Gao
>            Priority: Major
>
> Artemis currently does not support transactional acknowledgements:
> {quote}
> Message acknowledgements are not transactional. The ACK frame can not be part 
> of a transaction (it will be ignored if its transaction header is set).
> {quote}
> The STOMP 1.2 specification contains:
> {quote}
> Optionally, a transaction header MAY be specified, indicating that the 
> message acknowledgment SHOULD be part of the named transaction.
> {quote}
> And other brokers (such as ActiveMQ 5.x) do support transactional 
> acknowledgements.
> Artemis should support them too.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to