-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Rename ReactiveChannel #2135
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
Rename ReactiveChannel #2135
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,17 +16,18 @@ | |
|
||
package org.springframework.integration.channel; | ||
|
||
import org.reactivestreams.Publisher; | ||
|
||
import org.springframework.messaging.Message; | ||
|
||
import reactor.core.publisher.Flux; | ||
|
||
/** | ||
* @author Artem Bilan | ||
* @author Gary Russell | ||
* | ||
* @since 5.0 | ||
*/ | ||
public interface ReactiveSubscribableChannel { | ||
public interface FluxSubscribableChannel { | ||
|
||
void subscribeTo(Publisher<Message<?>> publisher); | ||
void subscribeTo(Flux<Message<?>> publisher); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why to be restricted just only to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes using Publisher for input arguments and returning Flux/Mono (where one is already used internally) is a pattern we follow in Spring Framework APIs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see reason to return something because |
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,11 +21,11 @@ | |
|
||
import org.springframework.integration.dsl.channel.DirectChannelSpec; | ||
import org.springframework.integration.dsl.channel.ExecutorChannelSpec; | ||
import org.springframework.integration.dsl.channel.FluxMessageChannelSpec; | ||
import org.springframework.integration.dsl.channel.MessageChannels; | ||
import org.springframework.integration.dsl.channel.PriorityChannelSpec; | ||
import org.springframework.integration.dsl.channel.PublishSubscribeChannelSpec; | ||
import org.springframework.integration.dsl.channel.QueueChannelSpec; | ||
import org.springframework.integration.dsl.channel.ReactiveChannelSpec; | ||
import org.springframework.integration.dsl.channel.RendezvousChannelSpec; | ||
import org.springframework.integration.store.ChannelMessageStore; | ||
import org.springframework.integration.store.PriorityCapableChannelMessageStore; | ||
|
@@ -132,19 +132,19 @@ public ExecutorChannelSpec executor(String id, Executor executor) { | |
} | ||
|
||
|
||
public ReactiveChannelSpec reactive() { | ||
public FluxMessageChannelSpec reactive() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, it isn't |
||
return MessageChannels.reactive(); | ||
} | ||
|
||
public ReactiveChannelSpec reactive(String id) { | ||
public FluxMessageChannelSpec reactive(String id) { | ||
return MessageChannels.reactive(id); | ||
} | ||
|
||
public ReactiveChannelSpec reactive(FluxProcessor<Message<?>, Message<?>> processor) { | ||
public FluxMessageChannelSpec reactive(FluxProcessor<Message<?>, Message<?>> processor) { | ||
return MessageChannels.reactive(processor); | ||
} | ||
|
||
public ReactiveChannelSpec reactive(String id, FluxProcessor<Message<?>, Message<?>> processor) { | ||
public FluxMessageChannelSpec reactive(String id, FluxProcessor<Message<?>, Message<?>> processor) { | ||
return MessageChannels.reactive(id, processor); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I missed somehow discussion.
Would you mind explaining to me one more time?
So, what is wrong to request just raw
Processor
andwrap()
internally if that is still required?Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the point of creating a
MessageChannel
forMono<Message<?>>
- by definition, in an integration flow, we are wiring a producer and consumer together with a pipe to transfer messages.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's still isn't clear.
I talk about
Processor
,but you mentionMono
somehow...Sorry, I don't follow