-
Enhancement
-
Resolution: Obsolete
-
Major
-
EAP_EWP 5.2.0 ER6
-
None
-
Not Required
-
NEW
In HornetQ User Guide [1] in chapter "2.3 Client-side Failure Handling" would be better to replace:
try { producer.send(createMessage(session, i)); System.out.println("Message: " + i); } catch (Exception e) { Thread.sleep(1000); producer.send(createMessage(session, i)); }
By:
int numberOfRetries = 0; while (numberOfRetries < maxRetries) { try { producer.send(msg); return; } catch (JMSException ex) { numberOfRetries++; } } // this is an error - failover was not succeed throw new Exception("FAILURE - MaxRetry reached");
@Clebert
Could you or anyone from the dev team review the code before we make it public, please?
Thanks a lot,
Mirek