Didn't found it in Google, so there is quick example how to send JMS message from Groovy script using Grab:
@Grab(group='org.apache.activemq',module = 'activemq-all', version='5.5.0') import org.apache.activemq.ActiveMQConnectionFactory import javax.jms.Session new ActiveMQConnectionFactory(brokerURL: 'tcp://localhost:61616').createConnection().with { start() createSession(false, Session.AUTO_ACKNOWLEDGE).with { createProducer().send(createQueue("queue"), createTextMessage("test")) } close() }
This comment has been removed by the author.
ReplyDeleteNice and clean! How about "Receiving ActiveMQ messages from Groovy" using your same coding structure?
ReplyDelete