[
https://issues.apache.org/jira/browse/ARTEMIS-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16407897#comment-16407897
]
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_r176080114
--- Diff:
artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/CommandType.java
---
@@ -0,0 +1,84 @@
+/*
+ * 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;
+
+public enum CommandType {
+
+ CONNECT(Stomp.Commands.CONNECT),
+ SEND(Stomp.Commands.SEND),
+ DISCONNECT(Stomp.Commands.DISCONNECT),
+ SUBSCRIBE(Stomp.Commands.SUBSCRIBE),
+ UNSUBSCRIBE(Stomp.Commands.UNSUBSCRIBE),
+ BEGIN(Stomp.Commands.BEGIN),
+ COMMIT(Stomp.Commands.COMMIT),
+ ABORT(Stomp.Commands.ABORT),
+ ACK(Stomp.Commands.ACK),
+ NACK(Stomp.Commands.NACK),
+ STOMP(Stomp.Commands.STOMP),
+ CONNECTED(Stomp.Responses.CONNECTED),
+ ERROR(Stomp.Responses.ERROR),
+ MESSAGE(Stomp.Responses.MESSAGE),
+ RECEIPT(Stomp.Responses.RECEIPT);
+
+ private String type;
+
+ CommandType(String command) {
+ type = command;
+ }
+
+ @Override
+ public String toString() {
+ return type;
+ }
+
+ public static CommandType getType(String command) {
+ switch (command) {
--- End diff --
There are serious performance implications on this, right?
you're using getType on the hot path... (on Every frame creation). What
happened to that code that would inspect just a few bytes of the frame and
create the StompFrame fast... this is a major regression here.
> 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)