Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 2.05 KB

README.md

File metadata and controls

47 lines (29 loc) · 2.05 KB

Synadia      NATS

Request Many Utility

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.

Current Release: 0.0.1   Current Snapshot: 0.1.0-SNAPSHOT

Artifact License Apache 2 Maven Central javadoc

Request Many Usage

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.

Gradle and Maven

See the Main README.md. The group is io.synadia The artifact is request-many

Copyright (c) 2024 Synadia Communications Inc. All Rights Reserved. See LICENSE and NOTICE file for details.