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() |
v0.1 |
Create Topic |
Topic topic = session.createTopic("testTopic"); |
jms.topic("testTopic") |
v0.1 |
Subscribe to Topic |
TopicSubscriber subscriber = session.createDurableSubscriber(topic, "sub-name") Unknown macro: {Message m -> println m.text }
as MessageListener |
topic.subscribe( {} as MessageListener ) |
v0.1 |
|
|
|
|