eventuate-tram / eventuate-tram-core

Transactional messaging for microservices
Other
1.03k stars 185 forks source link

No such header: ID in this message headers when use database generated ID mode #171

Open artemio77 opened 2 years ago

artemio77 commented 2 years ago

I try setup eventuate to use database generated IDs. When I debug eventuate core I found that eventuate didn't save message ID in header column but cdc-service use it to publish message to somewhere. Please take a look. Cdc-service exception:

Caused by: java.lang.RuntimeException: No such header: ID in this message io.eventuate.tram.cdc.connector.MessageWithDestination@1ef61ad 2021-09-24T18:20:00.435606302Z at io.eventuate.tram.cdc.connector.MessageWithDestination.getRequiredHeader(MessageWithDestination.java:52) 2021-09-24T18:20:00.435638102Z at io.eventuate.tram.cdc.connector.MessageWithDestination.getId(MessageWithDestination.java:62) 2021-09-24T18:20:00.435672999Z at java.util.Optional.orElseGet(Optional.java:267) 2021-09-24T18:20:00.435695927Z at io.eventuate.tram.cdc.connector.MessageWithDestinationPublishingStrategy.partitionKeyFor(MessageWithDestinationPublishingStrategy.java:11) 2021-09-24T18:20:00.435735256Z at io.eventuate.tram.cdc.connector.MessageWithDestinationPublishingStrategy.partitionKeyFor(MessageWithDestinationPublishingStrategy.java:7) 2021-09-24T18:20:00.435762111Z at io.eventuate.local.common.CdcDataPublisher.send(CdcDataPublisher.java:116) 2021-09-24T18:20:00.435792271Z at io.eventuate.local.common.CdcDataPublisher.sendMessage(CdcDataPublisher.java:100) 2021-09-24T18:20:00.435820526Z at io.eventuate.local.common.BinlogEntryHandler.publish(BinlogEntryHandler.java:34)

Problem code: io.eventuate.common.jdbc.EventuateCommonJdbcOperations#insertIntoMessageTableDatabaseId

FelipeBerrios commented 2 years ago

Hello, could you solve it?

artemio77 commented 1 year ago

No (