EMS receiving reply from temporary topic/queue
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019
02:20 PM
02-21-2019
02:20 PM
EMS receiving reply from temporary topic/queue
Can you please advise how to receive a reply from a temporary topic/queue using JMS Request?
Solved! Go to Solution.
7 REPLIES 7
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019
05:43 PM
02-21-2019
05:43 PM
How are you using the endpoing?
Regards,
Rao.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2019
01:01 AM
02-22-2019
01:01 AM
I'm using the following endpoint: readyjms://EMS::topic_<topicName>::topic_
According to what I found this topic_ should create a temporary topic for a reply. Is it correct?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2019
04:40 AM
02-22-2019
04:40 AM
No topic name mentioned. That means listens on the temporary queue for the reply.
Regards,
Rao.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2019
04:48 AM
02-22-2019
04:48 AM
Yes, but JMS header JMSReplyTo is not set. Therefore component doesn't know where to send the reply.
Can you advise how can set temporary topic in JMSReplyTo and the listen on it for a reply?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2019
12:26 AM
02-25-2019
12:26 AM
I managed to achieve this using Groovy script.
import com.eviware.soapui.impl.wsdl.submit.transports.jms.JMSConnectionHolder import com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils import com.eviware.soapui.impl.wsdl.submit.transports.jms.JMSEndpoint import hermes.Hermes import javax.jms.* def jmsEndpoint = new JMSEndpoint("jms://LOCAL::topic_<topicName>::topic_"); def hermes = HermesUtils.getHermes(context.testCase.testSuite.project, jmsEndpoint.sessionName); def jmsConnectionHolder = new JMSConnectionHolder( jmsEndpoint, hermes, false, null ,null ,null); Session jmsSession = jmsConnectionHolder.getSession(); Topic temporatyTopic = jmsSession.createTemporaryTopic(); Topic topicPublisher = jmsConnectionHolder.getTopic(jmsConnectionHolder.getJmsEndpoint().getSend()); MessageProducer messageProducer = jmsSession.createProducer(topicPublisher); TextMessage textMessageSend = jmsSession.createTextMessage(); textMessageSend.setJMSReplyTo(temporatyTopic); textMessageSend.setText( "jms message from groovy"); messageProducer.send(textMessageSend); MessageConsumer messageConsumer = jmsSession.createConsumer(temporatyTopic); String receivedMessage = messageConsumer.receive().getBody(String.class); log.info(receivedMessage); jmsConnectionHolder.closeAll();
Can I archive the same functionality using JMS Request step?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2019
03:41 AM
02-25-2019
03:41 AM
Why no use groovy step then(instead of other type of test step)?
Regards,
Rao.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2019
05:14 AM
02-25-2019
05:14 AM
I'm just curious if it's possible to do the same using JMS Request test set.
