Open msillence opened 2 years ago
Can you please create a sample app with a test describing what is wrong? I don't really understand what is not correct.
Sorry been a bit snowed under there is also info here https://stackoverflow.com/a/52304789 the core concept is to send a message then wait for a week default or 45 mins with the setting above
I did have a test harness I'll see if I can publish it
Expected Behavior
Message is sent
Actual Behaviour
sending fails with key error message being: "The producer attempted to use a producer id which is not currently assigned to its transactional id"
Essentially it's this error: https://stackoverflow.com/a/59421077
a streaming application that had no traffic for 7 days, it’s producer metadata was deleted
Steps To Reproduce
add the config to reduce the timeout from the default 1 week to 10 seconds: KAFKA_TRANSACTIONAL_ID_EXPIRATION_MS=10000 or set property transactional.id.expiration.ms=10000
I still find it takes significantly longer than 10 second, I'm testing with 45 minutes.
using the code: https://micronaut-projects.github.io/micronaut-kafka/latest/guide/#kafkaClientTx
notably I've got the
producer.initTransactions();
in the class initalisation as there's an exception if you call this twice:TransactionalId holding-tx: Invalid transition attempted from state READY to state INITIALIZING
Environment Information
Running with both docker and confluent cloud docker versions:
Example Application
No response
Version
3.4.1