Skip to content

Update MDC handling in the AmqpAppender #1014

Closed
@egusev

Description

@egusev

For proper logging additional information of calling paramenters/context is required. The best option to do that is MDC.
The current implementation copies MDC into the message's headers.
The main problem with it that Rabbit has limited size for header and default size is pretty small - 131072 bytes (128 kb). unlike of message body it can't be fragmented spring-attic/spring-cloud-stream-binder-rabbit#159

so the proposals are:

  1. remove (or make it optional) serializating MDC into headers
  2. add possibility to add MDC into the message body
  3. make AmqpAppender.sendEvent protected (instead of private) to allow override it to do custom stuff

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions