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

Alex Rudyy commented on QPID-7646:
----------------------------------

The AMQP transactions are scoped within Transaction Coordinator Link. Thus, the 
scoped to the session. As result, statistics {{TransactedEnqueuedMessages}} and 
{{TransactedDequeuedMessages}} can be exposed via sessions. I am not sure that 
we need to move Session#localTransaction(Begins|Rollback|Open) from Session to 
Connection. IMHO, it is unnecessary. I would add into {{Session}} and 
{{Connection}} derived attributes getOpenTransactions() (into all protocols). 
For 7.0 the {{OpenTransaction}} can encapsulate the transaction start, maybe 
id. I think that #getOldestTransactionStartTime can be added to both 
{{Session}} and {{Connection}}.

To summarise my suggestion, I think we need to do the following for 7.0
# Introduce statistics {{TransactedEnqueuedMessages}} and 
{{TransactedDequeuedMessages}} on {{QueueManagingVirtualHost}}, {{Connection}} 
and {{Session}}
# Introduce statistics {{OldestTransactionStartTime}} on {{Connection}} and 
{{Session}}. Perhaps we can it  even to  {{QueueManagingVirtualHost}}
# Leave #localTransaction(Begins|Rollback|Open) on {{Session}}. We need to add 
implementation for AMQP 1.0
# Introduce derived attributes {{getOPenTransactions}} on {{Connection}} and 
{{Session}}. for v7.0 they will return some information about transaction id 
and start time (and may be duration). Additionally we can expose the number of 
published messages and their total size


> [Java Broker] fix AbstractAMQPSession#getLocalTransactionOpen to support 
> values > 1
> -----------------------------------------------------------------------------------
>
>                 Key: QPID-7646
>                 URL: https://issues.apache.org/jira/browse/QPID-7646
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>            Reporter: Lorenz Quack
>             Fix For: qpid-java-broker-7.0.0
>
>
> During the review of QPID-7633 it was noted:
> bq. Why do we only return 0 or 1 from 
> AbstractAMQPSession#getLocalTransactionOpen. That seems wrong.
> which was followed up by Rob:
> bq. On getLocalTransactionOpen, I agree that looks very dodgy. In AMQP 0-x 
> the value will only be 0 or 1, but I'm not sure the implementation the we 
> have now is safe. I think the implementations will need to define this 
> properly (i.e. the calculation will need to be atomic, and the value may be > 
> 1 for AMQP 1.0 )



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to