cancel
Showing results for 
Search instead for 
Did you mean: 

Message ID req in MM

Former Member
0 Kudos

Hello All,

Can some one tell me the how can I get messageID in message mapping using Dynamic Config class

Thanks,

Regards,

Moorthy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

String MessageID;

java.util.Map param = container.getTransformationParameters();

MessageID = (String) param.get (StreamTransformationConstants.MESSAGE_ID);

return MessageID;

regards,

Carme

Answers (2)

Answers (2)

abhay_rajhans2
Contributor
0 Kudos

Hi Moorthy,

You need to write the code mentioned above in a UDF with out any input paramater.

Then pass the output of that UDF to the filed of output payload. This will give you message id.

Former Member
0 Kudos

GlobalContainer globalContainer = container.getGlobalContainer();

String headerField;

Map map = globalContainer.getParameters();

headerField = (String)map.get(StreamTransformationConstants.MESSAGE_ID);

return headerField;