Tries subscribe to the 'optimal' requests.
Tries subscribe to the 'optimal' requests. So if we handle a request which tells us there are 3 items remaining and 'optimal' is set to 10, then a 'take' request is made for 7 work items.
If 'optimal' is less than the items remaining then no action is performed.
Represents how many work items will be requested upon request completion
Represents how many work items will be requested upon request completion
This is the default case -- just request one work item (e.g.
This is the default case -- just request one work item (e.g. one in, one out semantics)
A directive which will ask the exchange for another work item if the request was sent in response to an exchange match (e.g.
A directive which will ask the exchange for another work item if the request was sent in response to an exchange match (e.g. it contains the exchanger headers).
The subscription key used for the exchange will be taken from the MatchDetails taken from the request. If there are no MatchDetails then 'takeNextOnComplete' will have no effect
the exchange from which the work is pulled
how many items should be requested on complete? Defaults to just replacing one work item
a directive yo
(Since version ) see corresponding Javadoc for more information.
The 'RouteSubscriptionSupport' exposes a directive exists to integrate existing routes with an Exchange.
Consider some basic route:
post(path("foo")) { ... }
We want to be able to integrate it with an exchange to make it a reactive, work-pulling route. We also want that to be non-intrusive. A client of our basic route shouldn't be forced to go via the Exchange to use our endpoint; it should work the same with or without the exchange.
To accomplish this, we'll need to know: 1) The exchange from which to pull more work 2) the subscription key used to request the next work item 3) a means to identify whether the given request was made as a result of a match on the exchange (as opposed to just being hit directly) 4) to know when the response is complete