public void saveReplyDestination ( JmsMessage jmsMessage , TestContext context ) { if ( jmsMessage . getReplyTo ( ) != null ) { String correlationKeyName = endpointConfiguration . getCorrelator ( ) . getCorrelationKeyName ( getName ( ) ) ; String correlationKey = endpointConfiguration . getCorrelator ( ) . getCorrelationKey ( jmsMessage ) ; correlationManager . saveCorrelationKey ( correlationKeyName , correlationKey , context ) ; correlationManager . store ( correlationKey , jmsMessage . getReplyTo ( ) ) ; } else { log . warn ( "Unable to retrieve reply to destination for message \n" + jmsMessage + "\n - no reply to destination found in message headers!" ) ; } }
Store the reply destination either straight forward or with a given message correlation key .