-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Example showing request + response #101
Comments
I agree, an example of this would be useful! I'll see whether I get time to add one in the next few weeks. |
Is this possible without some kind of request/reply correlation IDs? my fear is that you would transmit a message, then switch to being a receiver, but receive a response to a message that you didn’t just transmit. For example like out of order |
Flume guarantees ordering from the perspective of a particular thread. In general, you'd probably want to have two channels for this to work: one to send on, one to receive on. You also wouldn't want to share them between many threads because the messages might be received by the wrong thread. |
can you think of a way to solve multi-threaded exact request/response with channels or not really? |
The way this works in xtra is by using Flume one channel from sender to receiver, and sending a oneshot channel half along with the request that needs a response. There are alternate designs of course - maybe using IDs like you said. |
I know it's pretty custom and not a typical usecase but I think it'd be pretty cool to show the power of the library to show how to do exact request + response. aka,
tx
, wait forrx
back, but don't risk getting therx
from a differenttx
out of order.The text was updated successfully, but these errors were encountered: