jmstemplate

Synchronous Message send and receive using JMS template and Spring Boot

空扰寡人 提交于 2019-12-13 03:24:31
问题 I am after sending/receiving call to JMS queue synchronously using JMS Template and Spring boot. I went through official spring doc for JMS template but of no help. I am not too sure about calling receive() method specifically or it will automatically receive message once send() is invoked. Since this is synchronous call I only need to receive message that I've sent (with the correlation Id). Any help in this regard would be appreciated. Please let me know if you need any further info. Update

JmsTemplate has no send timeout

此生再无相见时 提交于 2019-12-12 16:05:16
问题 I have working JMS application with IBM MQ jars configuration , using spring It works well with correct queue information , but when i give wrong queue information it is hung at LOG.info("SENDING MESSAGE"); jmsTemplate.send(this.getDestination(), messageCreator ); //here I have my Log saying sending message , i am handling org.springframework.jmsexception , but it does not throw.....i think it is hung at that point. I am not able to find any property for jmstemplate for send timeout , only

JMSTemplate with multiple brokers. Destination resolving exception

被刻印的时光 ゝ 提交于 2019-12-11 17:03:24
问题 I have problem which I am trying solve all day, without success... I have an application which trying to send/receive messages to/from external system A and external system B. A and B it is WLS based external systems. While my application is coming up - i am reading all configurations and building my applicational JMSProducer and injecting JMSTemlate with predefined destination name in it. Here is my code: private JMSProducer initProducer(Conf conf) { DestinationResolver destinationResolver =

JmsTemplate with RECEIVE_TIMEOUT_NO_WAIT doesn't retrieve messages from JMS queue

梦想的初衷 提交于 2019-12-11 15:42:48
问题 Given I have ActiveMQ queue where many messages are already present. When I set receive timeout on JmsTemplate to RECEIVE_TIMEOUT_NO_WAIT which is equal to -1 : jmsTemplate.setReceiveTimeout(JmsTemplate.RECEIVE_TIMEOUT_NO_WAIT); and try to receive one of those messages: Message msg = jmsTemplate.receive(queueName); then msg is null , but it should not be according JavaDoc: /** * Timeout value indicating that a receive operation should * check if a message is immediately available without

Java Spring JMS: JmsTemplate to IBM MQ

回眸只為那壹抹淺笑 提交于 2019-12-07 17:42:26
问题 Update It was my mistake I forget the ssl debugging running, it is super fast now and working like magic I have a Spring Boot application that connects to IBM MQ using spring JMS. I realized that the jmsTemplate is super slow compared to not using Spring at all. I am sure I have something not configured correctly. Hope Someone can help. I create a connection factory using IBM MQ 8 jar files. @Bean public ConnectionFactory connectionFactory() { properties.getCipherSpec()); MQConnectionFactory

Not seeing message properties that I set explicitly (Spring/JMS/MQ)

房东的猫 提交于 2019-12-07 14:29:51
问题 Two separate processes are communicating via JMS over MQ. The writer sets a string property: new MessageAction() { public void actOn(Message message) throws JMSException { logger.debug("Setting message property (GmmThreadId, CASHFLOW-1234)"); message.setStringProperty("GmmThreadId", "CASHFLOW-1234"); } }); This MessageAction is executed, as shown in the logs: Setting message property (GmmThreadId, CASHFLOW-1234) The reader uses a message selector to obtain this message. (using Spring's

Sending Files using Active MQ with BlobMessage

我的梦境 提交于 2019-12-07 09:53:13
问题 I have an requirement in my application to send files from one application to another over HTTP/FTP protocol. I found following link which tells that the same can be done using Active MQ with supoort of Blob messages: activemq.apache.org/blob-messages.html I configured ActiveMq 5.8 on my windows machine, included required dependency for ActiveMQ lib in my pom.xml and i am able to send the simple javax.jms.TextMessage and javax.jms.MapMessage with org.springframework.jms.core.JmsTemplate But

Java Spring JMS: JmsTemplate to IBM MQ

安稳与你 提交于 2019-12-05 23:52:17
Update It was my mistake I forget the ssl debugging running, it is super fast now and working like magic I have a Spring Boot application that connects to IBM MQ using spring JMS. I realized that the jmsTemplate is super slow compared to not using Spring at all. I am sure I have something not configured correctly. Hope Someone can help. I create a connection factory using IBM MQ 8 jar files. @Bean public ConnectionFactory connectionFactory() { properties.getCipherSpec()); MQConnectionFactory factory = new MQConnectionFactory(); try { factory.setHostName(properties.getHost()); factory.setPort

Not seeing message properties that I set explicitly (Spring/JMS/MQ)

久未见 提交于 2019-12-05 22:54:44
Two separate processes are communicating via JMS over MQ. The writer sets a string property: new MessageAction() { public void actOn(Message message) throws JMSException { logger.debug("Setting message property (GmmThreadId, CASHFLOW-1234)"); message.setStringProperty("GmmThreadId", "CASHFLOW-1234"); } }); This MessageAction is executed, as shown in the logs: Setting message property (GmmThreadId, CASHFLOW-1234) The reader uses a message selector to obtain this message. (using Spring's JmsTemplate v1 - an old version I know, but it's baked into our vendor's framework and we're compelled to use

Sending Files using Active MQ with BlobMessage

為{幸葍}努か 提交于 2019-12-05 18:17:43
I have an requirement in my application to send files from one application to another over HTTP/FTP protocol. I found following link which tells that the same can be done using Active MQ with supoort of Blob messages: activemq.apache.org/blob-messages.html I configured ActiveMq 5.8 on my windows machine, included required dependency for ActiveMQ lib in my pom.xml and i am able to send the simple javax.jms.TextMessage and javax.jms.MapMessage with org.springframework.jms.core.JmsTemplate But while i moved to send BlobMessage using following method, a compile time error arises while creating the