Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Content on this page is under development, check the following email thread for the time being: http://www.nabble.com/Groovy-JMS-Category-td19861454.html

High Level Ideas

  •  use English language like

Groovy-style API Proposal 

  •  assumed to be start with a user provided JMS ConnectionFactory named "jms". In future release, this should not be required.

Type

JMS Usage (In Groovy Syntax with Static Type for clarity)

Proposed/Current API

Reference

Create Connection

Connection conn = jms.createConnection()

jms.connect()

v0.1

Create Session

Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE)

jms.session()
conn.session()

v0.1

Create Topic

Topic topic = session.createTopic("testTopic");

jms.topic("testTopic")
conn.topic("testTopic")
session.topic("testTopic")

v0.1

Subscribe to Topic

TopicSubscriber subscriber = session.createDurableSubscriber(topic, "sub-name")
MessageListener listener = {Message m -> println m.text } as MessageListener
subscriber.setMessageListener(listener) 

topic.subscribe( {} as MessageListener )

v0.1





  • No labels