Replies: 3 comments 4 replies
-
maybe @ozangunalp can help with this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'll check the problem with Without transactions, normally you can return a @Incoming("tally-summary")
@Outgoing("billable-usage-out")
@Transactional
public Multi<BillableUsage> consume(Tally payload, IncomingKafkaRecordMetadata metadata) {
// Instead of message you use the metadata to extract the header
MessageHelper.findFirstHeaderAsString(metadata, RECEIVED_KEY)
.ifPresent(
kafkaMessageKey ->
log.debug(
"Tally Summary received w/ key={}. Producing billable usage.",
kafkaMessageKey));
return Multi.createFrom().items(service.fromTallySummary(payload)
.map(billableUsageService::submitBillableUsage));
} |
Beta Was this translation helpful? Give feedback.
3 replies
-
@Sgitario With #2812 it is now possible to use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following use case:
All the above steps need to be executed in a single transaction, so for example, if the database fails, the message is nack, or if the emission of the messages fails the database queries are rollback.
What I've tried so far:
This fails with the following exception:
So, for some reason, the channel from the incoming message is not found as a consumer.
I also tried the following without luck:
In this case, this fails because we can't get
Message<Tally>
but Multi, but using Multi, we can't obtain the message headers anyway, right? Yet, I'm not sure if the transaction would work.Can somebody help about how I can do the above?
Beta Was this translation helpful? Give feedback.
All reactions