We have a Java application that sends JMS message via IBM WebSphere MQ. The consumer application requires the message content type to be set to "application/json". How can I go about doing it?
I've checked through a few references and it seems I can set extra header via method "setStringProperty(headerKey, headerName)", E.g.
Message jmsMsg = session.createTextMessage(msgStr);
jmsMsg.setStringProperty("Content-Type", "application/json");
The problem then is "Content-Type" is not a valid property key since it contains the "-" character.
Is this something that can be done in code? Or is it actually configured in the queue settings?