You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/docs/asciidoc/usage.adoc
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -242,6 +242,18 @@ The prefix is different for each `Requester` instance and the suffix is incremen
242
242
* it sets the _request_ https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties[`message-id` property] to the generated correlation ID.
243
243
* it extracts the correlation ID from the _reply_ https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties[`correlation-id` property] to correlate a reply with the appropriate request.
244
244
245
+
If the responder will perform expensive work, it can proactively check whether the requester is still present with the `Context#isRequesterAlive(Message)` method:
The requester can check the requester at any time - when a request comes in or even during a long processing - and react accordingly by stopping the processing.
255
+
Note each call to `Context#isRequesterAlive(Message)` implies a request to the broker.
256
+
245
257
Let's see how to customize some of the request/response support mechanics.
246
258
Imagine the request `message-id` property is a critical piece of information and we do not want to use it as the correlation ID.
247
259
The request can use the `correlation-id` property and the responder just has to extract the correlation ID from this property (instead of the `message-id` property by default).
0 commit comments