Skip to content

v2.1.0

Compare
Choose a tag to compare
@Numichi Numichi released this 29 May 11:32
· 140 commits to master since this release

Feature:

extract MDC from Context in "contextWrite" and thus simplifies context writing

val data = MDCContext.read() // Mono<MDC> by default context key
    .mapNotNull { it["key"] }
    .contextWrite {
        val mdc = MDCContext.getMDCOrDefault(it) // return: MDC, if not exist define, it will create a default
        mdc["key"] = "example"
        MDCContext.put(it, mdc) // result: Context
    }

StepVerifier.create(data2)
    .expectNext("example")
    .verifyComplete()

Deprecated

  • withEnableError builder method because the name is not accurate. EnableError and paramter is false.. It is misleading. Change to:
    • if not called, the error configuration is disabled
    • withError() set to true by default
    • you can configure it directly by the withError(boolean).