[hornetq-commits] JBoss hornetq SVN: r10277 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Mar 1 23:24:06 EST 2011
Author: clebert.suconic at jboss.com
Date: 2011-03-01 23:24:06 -0500 (Tue, 01 Mar 2011)
New Revision: 10277
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
Log:
Adding information about duplicate message
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-03-01 21:44:15 UTC (rev 10276)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/postoffice/impl/PostOfficeImpl.java 2011-03-02 04:24:06 UTC (rev 10277)
@@ -580,14 +580,16 @@
if (rejectDuplicates && isDuplicate)
{
- if (context.getTransaction() == null)
+ StringBuffer warnMessage = new StringBuffer();
+ warnMessage.append("Duplicate message detected - message will not be routed. Message information:\n");
+ for (SimpleString key : message.getPropertyNames())
{
- PostOfficeImpl.log.warn("Duplicate message detected - message will not be routed");
+ warnMessage.append(key + "=" + message.getObjectProperty(key) + "\n");
}
- else
+ PostOfficeImpl.log.warn(warnMessage.toString());
+
+ if (context.getTransaction() != null)
{
- PostOfficeImpl.log.warn("Duplicate message detected - transaction will be rejected");
-
context.getTransaction().markAsRollbackOnly(null);
}
More information about the hornetq-commits
mailing list