activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1156678 - in /activemq/activemq-apollo/trunk/apollo-stomp/src: main/scala/org/apache/activemq/apollo/stomp/ test/scala/org/apache/activemq/apollo/stomp/ test/scala/org/apache/activemq/apollo/stomp/perf/
Date Thu, 11 Aug 2011 17:06:43 GMT
Author: chirino
Date: Thu Aug 11 17:06:43 2011
New Revision: 1156678

URL: http://svn.apache.org/viewvc?rev=1156678&view=rev
Log:
Fixes https://issues.apache.org/jira/browse/APLO-72 : client-individual ack mode is not supported.

Modified:
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompFrame.scala
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompFrame.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompFrame.scala?rev=1156678&r1=1156677&r2=1156678&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompFrame.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompFrame.scala
Thu Aug 11 17:06:43 2011
@@ -415,12 +415,9 @@ object Stomp {
 
   val ACK_MODE_AUTO = ascii("auto")
   val ACK_MODE_NONE = ascii("none")
-  
   val ACK_MODE_CLIENT = ascii("client")
-  val ACK_MODE_SESSION = ascii("session")
-  
-  val ACK_MODE_MESSAGE = ascii("message")
-    
+  val ACK_MODE_CLIENT_INDIVIDUAL = ascii("client-individual")
+
   val V1_0 = ascii("1.0")
   val V1_1 = ascii("1.1")
   val DEFAULT_HEART_BEAT = ascii("0,0")

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala?rev=1156678&r1=1156677&r2=1156678&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
Thu Aug 11 17:06:43 2011
@@ -323,10 +323,9 @@ class StompProtocolHandler extends Proto
       case ACK_MODE_AUTO=>new AutoAckHandler
       case ACK_MODE_NONE=>new AutoAckHandler
       case ACK_MODE_CLIENT=> new SessionAckHandler
-      case ACK_MODE_SESSION=> new SessionAckHandler
-      case ACK_MODE_MESSAGE=> new MessageAckHandler
+      case ACK_MODE_CLIENT_INDIVIDUAL=> new MessageAckHandler
       case ack:AsciiBuffer =>
-        die("Unsuported ack mode: "+ack);
+        die("Unsupported ack mode: "+ack);
     }
 
     val consumer_sink = sink_manager.open()

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala?rev=1156678&r1=1156677&r2=1156678&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/StompTest.scala
Thu Aug 11 17:06:43 2011
@@ -1142,13 +1142,13 @@ class StompTransactionTest extends Stomp
 
 class StompAckModeTest extends StompTestSupport {
 
-  test("ack:session redelivers on client disconnect") {
+  test("ack:client redelivers on client disconnect") {
     connect("1.1")
 
     def put(id:Int) = {
       client.write(
         "SEND\n" +
-        "destination:/queue/ackmode-session\n" +
+        "destination:/queue/ackmode-client\n" +
         "\n" +
         "message:"+id+"\n")
     }
@@ -1158,8 +1158,8 @@ class StompAckModeTest extends StompTest
 
     client.write(
       "SUBSCRIBE\n" +
-      "destination:/queue/ackmode-session\n" +
-      "ack:session\n" +
+      "destination:/queue/ackmode-client\n" +
+      "ack:client\n" +
       "id:0\n" +
       "\n")
 
@@ -1196,8 +1196,8 @@ class StompAckModeTest extends StompTest
 
     client.write(
       "SUBSCRIBE\n" +
-      "destination:/queue/ackmode-session\n" +
-      "ack:session\n" +
+      "destination:/queue/ackmode-client\n" +
+      "ack:client\n" +
       "id:0\n" +
       "\n")
     get(3)
@@ -1206,7 +1206,7 @@ class StompAckModeTest extends StompTest
   }
 
 
-  test("ack:message redelivers on client disconnect") {
+  test("ack:client-individual redelivers on client disconnect") {
     connect("1.1")
 
     def put(id:Int) = {
@@ -1223,7 +1223,7 @@ class StompAckModeTest extends StompTest
     client.write(
       "SUBSCRIBE\n" +
       "destination:/queue/ackmode-message\n" +
-      "ack:message\n" +
+      "ack:client-individual\n" +
       "id:0\n" +
       "\n")
 
@@ -1261,7 +1261,7 @@ class StompAckModeTest extends StompTest
     client.write(
       "SUBSCRIBE\n" +
       "destination:/queue/ackmode-message\n" +
-      "ack:session\n" +
+      "ack:client-individual\n" +
       "id:0\n" +
       "\n")
     get(1)

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala?rev=1156678&r1=1156677&r2=1156678&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala
Thu Aug 11 17:06:43 2011
@@ -51,7 +51,7 @@ class StompRemoteConsumer extends Remote
     headers ::= (ID, ascii("stomp-sub-" + name))
 
     if( persistent ) {
-      headers ::= (ACK_MODE, ACK_MODE_CLIENT)
+      headers ::= (ACK_MODE, ACK_MODE_CLIENT_INDIVIDUAL)
     }
 
     frame = StompFrame(SUBSCRIBE, headers);



Mime
View raw message