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

Is there a way to provide exchange for @RabbitClient dynamically? #617

Open
eugenenekh opened this issue Apr 11, 2024 · 0 comments
Open

Comments

@eugenenekh
Copy link

Issue description

Hello guys!

In the following example from the guide

package example.micronaut;

import io.micronaut.rabbitmq.annotation.Binding;
import io.micronaut.rabbitmq.annotation.RabbitClient;

@RabbitClient("micronaut") 
public interface AnalyticsClient {

    @Binding("analytics") 
    void updateAnalytics(Book book); 
}

I can provide binding dynamically like this

package example.micronaut;

import io.micronaut.rabbitmq.annotation.Binding;
import io.micronaut.rabbitmq.annotation.RabbitClient;

@RabbitClient("micronaut") 
public interface AnalyticsClient {

    void updateAnalytics(@Binding String bindingForAnalytics, Book book); 
}

And call it like

    client.updateAnalytics("analytics", book);

Is there any way to do something similar for the exchange (value of @RabbitClient)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants