Closed nrsina closed 4 years ago
Eventuate Tram will stop processing messages if a message handler throws an exception - no messages will be lost. The assumption is that an exception indicates a bug (or some other inability to process messages) that must be fixed before message processing can continue.
Also, code invoked by message handlers shouldn't use Spring's @Transactional
since that interferes with Eventuate Tram's transaction management. The stack trace suggests that @Transactional
is being used.
I think it's better to make "stopping consumer after an exception" configurable.
<< what behavior do you want?
I'd like to know more about the CDC code changes required to support Oracle. If you are just supporting polling I would have expected that you just needed to define a EventuateSqlDialect
. I created this issue: https://github.com/eventuate-foundation/eventuate-cdc/issues/64
I'd like to know more about the CDC code changes required to support Oracle. If you are just supporting polling I would have expected that you just needed to define a
EventuateSqlDialect
. I created this issue: eventuate-foundation/eventuate-cdc#64
Thanks for your detailed answer.
Yes I was using @Transactional
. So that is the problem. thank you 👍
Sure. I don't have access to the code right now but I will write the changes I needed to make to CDC in that issue tomorrow. As I recall, creating a new EventuateSqlDialect was not enough for Oracle (Polling). I've also made some small hacks to make it work but hopefully I can make it better with your help.
Kind Regards
Eventuate Tram will stop processing messages if a message handler throws an exception - no messages will be lost. The assumption is that an exception indicates a bug (or some other inability to process messages) that must be fixed before message processing can continue.
Also, code invoked by message handlers shouldn't use Spring's
@Transactional
since that interferes with Eventuate Tram's transaction management. The stack trace suggests that@Transactional
is being used.
I think it's better to make "stopping consumer after an exception" configurable.
<< what behavior do you want?
hello~! Does that mean that a method is proprietary to the message handler and that callers from other aspects who have the same business intent will not be able to share the methods, Because the transaction is not open
You would need two methods:
Hello My app received an exception while processing messages received from another microservice. There was around 30 messages in Kafka topic and the app wasn't consuming due to an exception which caused the consumer to stop. After restart, it had processed around 20 messages before the exception:
I have also imported OptimisticLockingDecoratorConfiguration to my Configuration bean. My database is Oracle (I've added Oracle support to Eventuate CDC. it needed many code changes) Any help would be appreciated. This is a very critical app and it should not lose even one message. I think it's better to make "stopping consumer after an exception" configurable.
Best Regards, Sina