watermill-kafka icon indicating copy to clipboard operation
watermill-kafka copied to clipboard

Set context for copied message on retry

Open sevaorlov opened this issue 2 years ago • 0 comments

Sets the context for the message copy when it is retried.

The problem is that currently if a handler fails to process a message - it is copied, but without a context. That might result in the errors in the handler if it waits for the partition, offset or message timestamp fields in the context, which are set here https://github.com/ThreeDotsLabs/watermill-kafka/blob/b03a4f48517c6afd50b3b1de4d89faa57faf971f/pkg/kafka/subscriber.go#L546-L548

Context is created here and set for the original message https://github.com/ThreeDotsLabs/watermill-kafka/blob/b03a4f48517c6afd50b3b1de4d89faa57faf971f/pkg/kafka/subscriber.go#L556-L558

sevaorlov avatar Aug 31 '22 11:08 sevaorlov