public interface Correlator
SenderTaskof receiving the appropriate response to the original request. This is done based on a correlation id that is extracted from both request and response. Upon a successful match,
SenderTask.registerResponse(Serializable)is called. For performance reasons, all interface methods should be implemented thread safe without locking and or synchronization. All implementations should make sure that they do not keep eating up the memory and clean their data structures regularly.
|Modifier and Type||Method and Description|
Registers a request to be sent.
Extracts the correlation id from the response and calls the corresponding sender task's
void registerRequest(SenderTask senderTask, Message message, Properties messageAttributes)
SenderTaskcontrolling the sending of the message.
message- The message to be sent and from which the correlation id is extracted.
messageAttributes- Message attributes of the message to be sent. Can help with correlation id extraction.
void registerResponse(Serializable response, io.vertx.core.MultiMap headers)
SenderTask.registerResponse(Serializable)method. Called from a receiver upon receiving a response.
response- The response received by
headers- Headers received with the response. Can be useful for discovering correlation id.
Copyright © 2010–2017 PerfCake Community. All rights reserved.