cost 303 ms
如何将我的 ReactiveSecurityContextHolder 角色传递给 mono webclient rest 调用? - How can I pass my ReactiveSecurityContextHolder role to the mono webclient rest call?

我有一个带有自定义过滤器的 Spring Cloud Gateway。 在此过滤器中,我尝试使用参数调用我的 web 客户端。 来自 ReactiveSecurityContextHolder 的角色。 getAccessToken 结果 a com.xy.HeaderGatewayFilte ...

在没有任何消息代理的情况下,为 API 集成(直接使用 WebClient)提供反应式微服务是否有任何风险? - Is there any risk in having reactive approach micro-services for API integration (direct using WebClient) ,without any message broker?

我正在实施微服务 API,但不打算拥有任何消息代理。 API 服务将通过 WebClient/Web Flux 相互通信。 由于技能/预算挑战,不使用任何消息代理。 像这样进行生产是否有风险? 故障转移/重放等缺点是什么? ...

Project Reactor - 长期运行的 Reactive Kafka Consumer - Project Reactor - Long running Reactive Kafka Consumer

有没有人有一个长期运行的反应式 Kafka 消费者的例子? https://github.com/reactor/reactor-kafka.git中的 SampleConsumer 在订阅后退出,这是预期的。但我有一个要求不断从我们的主题接收消息,并且在发生故障时我应该重新连接(特别是连接问题 ...

为什么在 Spring Cloud Stream 反应式消费者中遇到异常时会收到 onComplete 信号? - Why am I getting onComplete signal when an exception is encountered in Spring Cloud Stream reactive consumer?

我正在将 Spring Reactor 与 Spring Cloud Stream (GCP Pub/Sub Binder) 一起使用并遇到错误处理问题。 我可以用一个非常简单的例子来重现这个问题: 我期望的行为是看到“无法使用消息”打印,但是,这似乎不是发生的情况。 当向链添加.log()调用 ...

生成元素,将函数应用于 Reactor Flux 的两个连续元素 - Generate elements applying a function to two consecutive elements of a Reactor Flux

我有一个 Flux 会发出一些元素,为了简单起见,假设一个Flux<String> -> "1", "2", "3", "n" 我需要做的是获取两个连续的元素并应用一个操作(例如 flatMap)来从中生成一些元素。 再次假设该函数将第一个元素与第二个元素连接起来,将第二个元素与 ...

升级到 spring 启动 2.2 后 Springboot WebFlux 测试失败 - Springboot WebFlux tests failing after upgrade to spring boot 2.2

我有一些 Springboot 集成测试,它们在 Springboot 2.1 中运行良好,但现在我已经升级到 Springboot 2.2,它们失败了。 使用默认的 spring-boot 父依赖管理。 一些曾经有效的失败测试就像这个例子一样简单: 在升级之前,此测试按预期通过,但在升级之后,它失 ...

Webflux Controller '返回 Object 而不是 Mono' - Webflux Controller 'return Object instead of Mono'

您好,我是 Webflux 的新手,我遵循构建反应式微服务的教程。 在我的项目中,我遇到了以下问题。 我想为产品服务创建一个 crud api,下面是创建方法 问题是,当我从 postman 调用此方法时,我收到错误“block()/blockFirst()/blockLast() 正在阻塞,线程 ...

如何使用多个 web 调用和有条件的信号完成 flatMapMany? - How can I flatMapMany with multiple web calls and conditionally signal complete?

我需要编写一个方法从端点获取Location header 生成一系列Some ,每个都应该从从第一个端点获取的Location中检索。 需要返回一个Flux<Some> 看起来像这样。private WebClient client; Flux<Some> getSom ...

Spring 网关 AsyncPredicate 不适用于反应器和通量 - Spring Gateway AsyncPredicate not working with reactor and flux

我们为 Spring-Gateway 编写了一个自定义 Predicate 工厂来路由请求。 我们正在解析 XML 请求的主体,然后根据主体中存在的特定方法导出路由。 在执行此操作时,我们编写了以下代码来创建 ServerRquest。 使用旧版本的Spring-Boot-Parent (2.1.7 ...

org.springframework.boot.web.reactive.error.DefaultErrorAttributes 在 org.springframework.boot:2.3.1.RELEASE 中不再被调用 - org.springframework.boot.web.reactive.error.DefaultErrorAttributes is not getting called anymore in org.springframework.boot:2.3.1.RELEASE

Spring 无功 web: 在 spring 启动 2.2.* 的早期,我使用了一个扩展 DefaultErrorAttributes 的 class。 这个 class 用于全局处理整个微服务的异常。 当我升级到 2.3.1 时,它不再工作了。 我没有发现 spring reactive we ...

Webflux链接多个Mono - Webflux Chaining multiple Mono

我是响应式编程(Spring webflux)的新手,想知道如何最好地处理这个用例。 我有一个返回Mono的反应式服务调用( getAccount ),我想将它与另一个返回Mono<Set>的服务调用getBooks和一个执行某种转换并返回类似Mono<Set>的最终同步调 ...

如何测试 function 返回 Mono<void> 其中有另一个 Mono<t> 在使用 Reactor 的 StepVerifier</t></void> - How to test function returning Mono<Void> which has another Mono<T> within using Reactor's StepVerifier

我有一个这样的 ServiceWebClientInterface.java MyClass.java 我正在尝试使用 StepVerifier 对 myMethod 进行单元测试,但我无法在 myMethod 的内部 lambda function 中执行语句。 MyClassTest.ja ...

如何根据反应堆上下文更改 url webClient - How can I change the url webClient based on reactor context

基于已在 webfilter 上添加的国家/地区,我需要将请求修改到不同的服务器。 我已经将带有 webfilter 的上下文添加到了链中,我可以在这里看到它,但是我没有找到如何根据链上的信号上下文修改接收到的 clientRequest。 如果有人已经找到了一种方法并且可以提供帮助:return ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM