Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider blocking reactive messaging methods using @Transactional #21889

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

cescoffier
Copy link
Member

Fix #21795

@cescoffier
Copy link
Member Author

The benefit is the following:

before:

    @Incoming("prices")
    @Blocking
    @Transactional
    public void store(int priceInUsd) {
        Price price = new Price();
        price.value = priceInUsd;
        price.persist();
    }

after:

    @Incoming("prices")
    @Transactional
    public void store(int priceInUsd) {
        Price price = new Price();
        price.value = priceInUsd;
        price.persist();
    }

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@geoand geoand merged commit 267941c into quarkusio:main Dec 3, 2021
@quarkus-bot quarkus-bot bot added this to the 2.6 - main milestone Dec 3, 2021
@cescoffier cescoffier deleted the incoming-transactional-blocking branch March 15, 2022 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using @Transactional on a method annotated with @Incoming should add @Blocking if not present
3 participants