You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by df...@apache.org on 2021/04/09 20:12:19 UTC

[activemq-nms-openwire-generator] 14/32: https://issues.apache.org/activemq/browse/AMQNET-176

This is an automated email from the ASF dual-hosted git repository.

dfoulks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-nms-openwire-generator.git

commit cd5d8bf2d43a36484a2fec9c3dbcae9ffe831a9c
Author: Timothy A. Bish <ta...@apache.org>
AuthorDate: Tue Oct 27 19:59:34 2009 +0000

    https://issues.apache.org/activemq/browse/AMQNET-176
    
    Added an OnMessageRollback method to the Message to allow for the increment of the RedeliveryCounter
---
 pom.xml                                                              | 2 +-
 .../apache/activemq/nms/openwire/tool/commands/MessageGenerator.java | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c3ad024..5669d39 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,7 +61,7 @@
   </mailingLists>
 
   <properties>
-    <activemq-version>5.3-SNAPSHOT</activemq-version>
+    <activemq-version>5.3.0</activemq-version>
     <projectName>Apache NMS.ActiveMQ</projectName>
     <annogen-version>0.1.0</annogen-version>
     <ant-version>1.6.2</ant-version>
diff --git a/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageGenerator.java b/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageGenerator.java
index eba6084..20edb0f 100644
--- a/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageGenerator.java
+++ b/src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageGenerator.java
@@ -88,6 +88,11 @@ public class MessageGenerator extends CommandClassGenerator {
         out.println("            this.ReadOnlyBody = true;");
         out.println("        }");
         out.println("");
+        out.println("        public virtual void OnMessageRollback()" );
+        out.println("        {");
+        out.println("            this.redeliveryCounter++;" );
+        out.println("        }");
+        out.println("");
         out.println("        public bool IsExpired()");
         out.println("        {");
         out.println("            return this.expiration == 0 ? false : DateTime.UtcNow > DateUtils.ToDateTimeUtc(this.expiration);");