How to set JMSXUserID in Websphere MQ using Spring JMS

Every time I work with MQ and Spring JMS I want to poke my eyes out with a dull instrument. It’s always a pain in the neck. My most recent challenge was trying to get the JMSXUserID field to flow through to the application on the other side of MQ. First, I created a MessagePostProcessor to add the JMS header public class MyMessagePostProcessor implements MessagePostProcessor { private String userId; @Override public Message postProcessMessage(Message msg) throws JMSException { msg. [Read More]