Rohit Sukumaran
Rohit Sukumaran

Reputation: 233

Context Propagation in Micronaut

I'm currently migrating an application which was originally written in the Quarkus to Micronaut. The application relies on context propagation to propagate transactional context. In Quarkus, this was easily achievable using the provided context propagation extension. Unfortunately there seems to be no similar extension/feature in Micronaut (at least I couldn't find any).

If there isn't any alternative, how can I add the context propagation feature to my application in Micronaut?

Upvotes: 1

Views: 733

Answers (2)

makson
makson

Reputation: 2273

If you use Reactor then try to use integration between Micronaut and Reactor. Micronaut Reactor adds support for Project Reactor to a Micronaut 2.x application. If you are using Micronaut 1.x you do not need this module.

Micronaut Reactor

Upvotes: 0

Graeme Rocher
Graeme Rocher

Reputation: 7985

In general synchronous transactions can't be propagated across different threads so I am not sure how it helps to propagate them in your case.

Micronaut Data R2DBC supports non-blocking transactions and transactional context propagation for reactive flows if that is what you are after https://micronaut-projects.github.io/micronaut-r2dbc/1.0.x/guide/#transactionManagement

Upvotes: 1

Related Questions