如果我将目标值硬编码,则将执行processSampleMessage。
如果我尝试将其更改为动态一个$ {ibm.mq.channel},而不执行方法。我有想念吗?
@Component
public class SampleMessageReceiver {
@Autowired private RestTemplate restTemplate;
@Autowired private UrlsConfig urlsConfig;
@JmsListener(
destination = "${ibm.mq.channel}",
containerFactory = "myListenerContainerFactory",
selector = "JMSCorrelationID='c9d5e2d7c5c3e3c9d6d54040404040404040404040404040'")
public void processSampleMessage(@Valid SampleMessage sampleMessage) {
System.out.println("~~~~~~~~~~~~~~~~~~~ In process SampleMessages ~~~~~~~~~~~~~~~~~~~\n\n");
}
}