Skip to content

Invalid transition attempted from state IN_TRANSACTION to state IN_TRANSACTION after broker bounce #661

@garyrussell

Description

@garyrussell

While testing #660 ...

@RestController
class UserController {

    @Autowired
    private lateinit var kafka: KafkaTemplate<String, String>

    @Transactional
    @RequestMapping(value = ["/user"], method = [RequestMethod.POST])
    fun user(@RequestBody user: String): String {

        kafka.send("user_updated", user)

        println("Hit enter to continue")
        readLine();

        return user
    }
}

I stopped the broker, hit enter, and restarted the broker.

After that, all subsequent POSTs got

{"timestamp":"2018-04-23T16:47:10.101+0000","status":500,"error":"Internal Server Error","message":"Could not create Kafka transaction; nested exception is org.apache.kafka.common.KafkaException: TransactionalId txId0: Invalid transition attempted from state IN_TRANSACTION to state IN_TRANSACTION","path":"/user"}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions