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

Support SpEL expression for producer destination names #1424

Closed
sobychacko opened this issue Jul 26, 2018 · 1 comment
Closed

Support SpEL expression for producer destination names #1424

sobychacko opened this issue Jul 26, 2018 · 1 comment
Assignees

Comments

@sobychacko
Copy link
Contributor

From @ngbalk on July 22, 2018 22:44

Looking at this previous issue #130 and still think supporting SpEL in the topic name would be extremely useful. I've played around with the BinderAwareChannelResolver and using Routers to dynamically map to or create channels on the fly, however I feel that you should be able to maintain the MessageChannel abstraction from the underlying dynamic topic name.

My use case is the following, and having a dynamic topic name makes the most sense to me, however there may be an obvious alternative I am missing... if I am sharing my kafka cluster with multiple 'tenants', I may want to prepend my topic names with these tenant names... so 'orders' becomes 'tenant123_orders'.

From a Message Channel perspective, I would still like my channel to be named 'orders', since the resolved topic name is more of a kafka detail. If i created a Router (say TenantRouter), I would effectively be creating a new Channel for each one of these tenants, right?

Something like that following would be more convenient in my opinion:
spring.cloud....orders.destination=${TenantResolver.getTenantId + '_orders'}

Copied from original issue: spring-cloud/spring-cloud-stream-binder-kafka#414

@sobychacko
Copy link
Contributor Author

This issue is very old. Closing due to inactivity. Please feel free to re-open if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant