According to the [reference guide](http://projectreactor.io/docs/core/snapshot/reference/#context) a context added to a reactive sequence is immutable:

> 
> Use put(Object key, Object value) to store a key-value pair, returning
>  a new Context instance.
> 
> 
> 

Then I am wondering if there is a sort of "workaround" in order to update the context of a sequence, for example in replacing the old one.

To illustrate my case, consider the following example:

```
 @Test
public void contextGlobalTest() {
    Flux<String> chars = Flux.fromIterable(Arrays.asList("a", "b", "c", "d"));
    chars.flatMap(this::concat)
            .flatMap(m -> Mono.subscriberContext().map(ctx -> m + ctx.get("key2")))
            .subscriberContext(Context.of("key1", 1, "key2", "yy"))
            .subscribe(System.out::println);
}

private Flux<String> concat(String s) {
    Flux<String> flux = Flux.just(s + s);
    return flux.flatMap(entry -> Mono.subscriberContext()
                    .map(ctx -> entry + ctx.get("key1")))
               .subscriberContext(Context.of("key1", 2, "key2", "zz"));
}

```

The output is:
aa2yy
bb2yy
cc2yy
dd2yy,
but I was expecting:
aa2zz
bb2zz
cc2zz
dd2zz

So is there any solution to this case?

For those who are interested, I figure out a workaround:
One need to give a mutable object to the context and then mutate attribute of that object inside the context.
See [that post](https://github.com/reactor/reactor-core/issues/699) for more details