Ich versuche, einen Error Handler zu entwerfen, der 3 Redelivery-Versuche durchführt, und dann hört es auf zu versuchen. Hier ist mein Kamel-context.xml:Error Handler läuft weiter
<errorHandler id="logginghandler" type="DefaultErrorHandler">
<redeliveryPolicy maximumRedeliveries="3" redeliveryDelay="5000"
retryAttemptedLogLevel="ERROR" />
</errorHandler>
<route>
<from uri="file:/home/user/files/in"/>
<bean ref="mybean" method="doSomething"/>
<to uri="jms:queue:myqueue"/>
</route>
</camelContext>
Wenn ich die Strecke ausführen, aber der Handler hält die Nachricht redelivery versuchen immer:
[ile:///home/user/files/in] DefaultErrorHandler ERROR Failed delivery for (MessageId: ID-localhost-localdomain-47568-1462962389320-0-5 on ExchangeId: ID-localhost-localdomain-47568-1462962389320-0-6). On delivery attempt: 2 caught: java.lang.RuntimeException: Errore!
[ile:///home/user/files/in] DefaultErrorHandler ERROR Failed delivery for (MessageId: ID-localhost-localdomain-47568-1462962389320-0-5 on ExchangeId: ID-localhost-localdomain-47568-1462962389320-0-6). On delivery attempt: 3 caught: java.lang.RuntimeException: Errore!
[ile:///home/user/files/in] DefaultErrorHandler ERROR Failed
[ile:///home/user/files/in] GenericFileOnCompletion WARN Rollback file strategy: org.apache[email protected]52f47672 for file: GenericFile[/home/user/files/in/wrong.txt]
[ile:///home/user/files/in] DefaultErrorHandler ERROR Failed delivery for (MessageId: ID-localhost-localdomain-47568-1462962389320-0-5 on ExchangeId: ID-localhost-localdomain-47568-1462962389320-0-6). On delivery attempt: 2 caught: java.lang.RuntimeException: Errore!
[ile:///home/user/files/in] DefaultErrorHandler ERROR Failed delivery for (MessageId: ID-localhost-localdomain-47568-1462962389320-0-5 on ExchangeId: ID-localhost-localdomain-47568-1462962389320-0-6). On delivery attempt: 3 caught: java.lang.RuntimeException: Errore!
Jede Idee, was ich vermisst?
Danke, ich habe es! – user2824073