ScriptJMSResp details

ScriptJMSResp methods enable you to perform such tasks as getting data and metadata that is passed to the endpoint and getting the endpoint name.

Table 1. ScriptJMSResp methods
ScriptJMSResp methods Purpose
getData() Gets byte[] data that is passed to the endpoint.
getMetaData() Gets the metadata java.util.Map object that was passed in to the endpoint. This object contains some of the JMS or Kafka message headers.
getEndPointName()) Gets the endpoint name.
getError() Gets the error java.lang.Exception instance form JMS response.
The following sample script demonstrates getting the endpoint name.
def msgProps(ctx):
  ctx.addProperty("maxendpoint",ctx.getEndPointName())