spring-cloud-bus icon indicating copy to clipboard operation
spring-cloud-bus copied to clipboard

jGroups integration for spring-cloud-bus

Open Mobe91 opened this issue 1 year ago • 3 comments

I am working on a project that uses embedded Infinispan for distributed caching. As this solution is based on jGroups for cluster management it would come in handy to also have a binder for spring-cloud-bus that works via jGroups. Do you think this would make sense and if it would be viable to do?

One use case would be to e.g. refresh the application context for all applications in the jGroups cluster when the environment changes.

Mobe91 avatar Apr 10 '24 12:04 Mobe91

It sounds like maybe this might be an enhancement to be made in Spring Cloud Stream (which Spring Cloud Bus leverages). @sobychacko @olegz what do you think?

ryanjbaxter avatar Apr 10 '24 14:04 ryanjbaxter

How does a binder help in this scenario? A binder in Spring Cloud Stream is an abstraction specifically built for a target middleware, such as Apache Kafka, RabbitMQ, Apache Pulsar, etc. Binder implementations allow the end-user applications to communicate with various middleware systems in a transport-neutral manner. There are some features that Spring Cloud Stream leverages from a single middleware technology, then makes them available as common features that can be applied against other target middleware systems. For example, Spring Cloud Stream takes Kafka's concept of consumer groups and partitions and provides them as top-level features that other systems can use, although they may not support them as natively. However, this is not a requirement for new binder implementations, and they can skip them if they choose to. I don't know much about jGroups, but a quick look gives the impression that this is a toolkit for messaging-based communications. I am unsure how we can provide a binder on top of this, but if there are use cases where this may be helpful, please elaborate. I think Spring Cloud Bus already has some built-in features for refreshing the context across various app contexts; maybe this may be a better fit in Bus itself rather than implementing a new binder in Spring Cloud Stream. Thanks!

sobychacko avatar Apr 10 '24 15:04 sobychacko

Makes sense @sobychacko thanks.

I think we would consider a PR to support this if there is enough interest.

ryanjbaxter avatar Apr 10 '24 17:04 ryanjbaxter