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

Spring Cloud Stream Reactor support. #572

Closed
wants to merge 1 commit into from

Conversation

joshlong
Copy link
Contributor

Adds support for the reactor spring cloud stream binder.

Copy link
Contributor

@snicoll snicoll left a comment

Choose a reason for hiding this comment

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

I am not sure I understand why this particular dependency deserves to be added here. I've added a few comments to hopefully figure this out.

@@ -971,6 +971,17 @@ initializr:
versionRange: 1.3.0.RELEASE
groupId: org.springframework.cloud
artifactId: spring-cloud-stream-binder-kafka
- name: Stream Reactor
id: cloud-stream-reactive
description: Messaging microservices with Reactor. Typically used with a Spring Cloud Stream binder implementation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typically used with a Spring Cloud Stream binder implementation.

What does that mean. Does this work standalone or does this require another dependency?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it requires another dependency. You must choose a Spring Cloud Stream binder implementation like Kafka or RabbitMQ

- name: Stream Reactor
id: cloud-stream-reactive
description: Messaging microservices with Reactor. Typically used with a Spring Cloud Stream binder implementation.
versionRange: 1.3.0.RELEASE
Copy link
Contributor

Choose a reason for hiding this comment

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

That looks fishy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand. What's "fishy"?

- rel: reference
href: https://docs.spring.io/spring-cloud-stream/docs/current/reference/htmlsingle/#_reactive_programming_support
description: Reactive Programming support for Spring Cloud Stream

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like a reference to a sample that demonstrates what you can do with this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here ya go. In a normal Spring Cloud Stream application I can say

@StreamListener("incomingMessageChannel") 
public void incoming( Message<String> msg) { 
 // handle a new message 
}

or:

@StreamListener("incomingMessageChannel") 
public void incoming( String msg) { 
 // handle a new message 
}

and messages will be delivered to the handler method from whatever message broker you've specified in choosing your Spring Cloud Stream binder. With the new support represented by this checkbox, we can have the incoming values delivered as a Reactor Flux<T>. Your method is called once and all values are delivered as new values in the Flux<T> stream. This makes it trivial to do things like windowing over values, and integrating with other reactive Publisher<T> types (such as those that WebClient produces).

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Jan 11, 2018
@snicoll
Copy link
Contributor

snicoll commented Jan 11, 2018

Duplicate of #557

@snicoll snicoll marked this as a duplicate of #557 Jan 11, 2018
@snicoll snicoll closed this Jan 11, 2018
@snicoll snicoll added status: duplicate and removed status: waiting-for-feedback We need additional information before we can continue labels Jan 11, 2018
@snicoll
Copy link
Contributor

snicoll commented Jan 11, 2018

@joshlong we already discussed this entry in another issue you've created.

sayeedap pushed a commit to sayeedap/initializr that referenced this pull request Sep 16, 2022
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.

2 participants