Author: clebert.suconic(a)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);
}
Show replies by date