Skip to content

Exception thrown from message consumer breaks tracing for subsequent messages #1327

@Anoobizzz

Description

@Anoobizzz

Used version: 4.3.0
Micrometer tracing context doesn't get created because wrapper function doesn't get called after an exception is thrown by message consumer.

Issue that was fixed in #1198 seems to be repeating again but now because "targetFunction.wrapped" flag doesn't get switched back to "false" if an exception is thrown from "doApply":
spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/catalog/FunctionAroundWrapper.java

Scenario:

  • Before an exception micrometer tracing context is available in consumer
  • An exception is thrown within message consumer logic
  • Attempting to get tracing context when consuming subsequent messages will return null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions