Package io.micronaut.jms.templates
Class JmsConsumer
java.lang.Object
io.micronaut.jms.templates.JmsConsumer
Helper class that receives messages, configuring JMS connections, sessions,
etc. for you.
TODO rename with JmsProducer
- Since:
- 1.0.0
- Author:
- Elliott Pope
-
Constructor Summary
ConstructorsConstructorDescriptionJmsConsumer(JMSDestinationType type, JMSConnectionPool connectionPool, Deserializer deserializer) JmsConsumer(JMSDestinationType type, JMSConnectionPool connectionPool, Deserializer deserializer, boolean sessionTransacted, int sessionAcknowledgeMode) -
Method Summary
-
Constructor Details
-
JmsConsumer
public JmsConsumer(JMSDestinationType type, JMSConnectionPool connectionPool, Deserializer deserializer) -
JmsConsumer
public JmsConsumer(JMSDestinationType type, JMSConnectionPool connectionPool, Deserializer deserializer, boolean sessionTransacted, int sessionAcknowledgeMode)
-
-
Method Details
-
receive
Receives aMessagefrom the broker and and converts it to an instance of type<T>.- Type Parameters:
T- the class type- Parameters:
destination- the queue or topic nameclazz- the class- Returns:
- the message from the broker as an object instance of type
<T>.
-
receive
Receives aMessagefrom the broker.- Parameters:
destination- the queue or topic name- Returns:
- the message
-
toString
-