Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pnnl.goss.core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ dependencies {

// AssertJ for fluent assertions
testImplementation 'org.assertj:assertj-core:3.26.3'

// Embedded broker for GOSS-023: bounded-receive must be proven against a
// real JMS session's wall-clock blocking behavior, not only a mocked
// MessageConsumer. Test-scope only; pnnl.goss.core.runner already carries
// this at implementation scope for its own live-broker itests.
testImplementation 'org.apache.activemq:activemq-broker:6.2.0'
}

test {
Expand Down
47 changes: 47 additions & 0 deletions pnnl.goss.core/src/pnnl/goss/core/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,53 @@ public Serializable getResponse(Serializable request, String destination,
public Serializable getResponse(Serializable request, String destination,
RESPONSE_FORMAT responseFormat, DESTINATION_TYPE destinationType) throws SystemException, JMSException;

/**
* Makes synchronous call to the server using QUEUE destination (default),
* bounded by an explicit receive timeout. Unlike the no-timeout overloads
* (which block indefinitely waiting for a reply), this returns {@code null}
* once {@code timeoutMillis} elapses without a reply, rather than blocking the
* calling thread forever. Intended for callers that need to retry against a
* service that may not be answerable yet (a boot-order race), where an
* unbounded wait would defeat the retry loop entirely.
*
* @param request
* @param destination
* @param responseFormat
* @param timeoutMillis
* maximum time to wait for a reply, in milliseconds. A value of
* {@code 0} blocks indefinitely (matches
* {@link jakarta.jms.MessageConsumer#receive(long)} semantics).
* @return the response, or {@code null} if no reply arrived within
* {@code timeoutMillis}
* @throws SystemException
*/
public Serializable getResponse(Serializable request, String destination,
RESPONSE_FORMAT responseFormat, long timeoutMillis) throws SystemException, JMSException;

/**
* Makes synchronous call to the server with specified destination type, bounded
* by an explicit receive timeout. See
* {@link #getResponse(Serializable, String, RESPONSE_FORMAT, long)} for the
* timeout semantics.
*
* @param request
* @param destination
* destination name
* @param responseFormat
* @param destinationType
* TOPIC or QUEUE
* @param timeoutMillis
* maximum time to wait for a reply, in milliseconds. A value of
* {@code 0} blocks indefinitely (matches
* {@link jakarta.jms.MessageConsumer#receive(long)} semantics).
* @return the response, or {@code null} if no reply arrived within
* {@code timeoutMillis}
* @throws SystemException
*/
public Serializable getResponse(Serializable request, String destination,
RESPONSE_FORMAT responseFormat, DESTINATION_TYPE destinationType, long timeoutMillis)
throws SystemException, JMSException;

/**
* Lets the client subscribe to a Topic of the given name for event based
* communication.
Expand Down
Loading
Loading