The Request Many utility is a full implementation for an often asked for feature, which is the ability to get many responses from a single core request, instead of the usual first response for a request. This allows you to implement patterns like:
- Scatter-gather pattern, getting responses from many workers.
- Many responses, for instance, a multipart payload, from a single worker.
Fetch
Fetch returns all the responses in a list:
Queue
Queue returns a LinkedBlockingQueue that you can get messages from.
Request
Request accepts a callback. Fetch and Queue use this under the covers. You can use this to provide a custom "sentinel", a message that indicates the request is complete. Useful for the multipart payload.
The Unit Tests may also be of interest.
Copyright (c) 2024-2025 Synadia Communications Inc. All Rights Reserved. See LICENSE and NOTICE file for details.
