public class NatsMessageConsumer extends Object
Constructor and Description |
---|
NatsMessageConsumer(Properties natsProperties,
String inboundEndpointName) |
Modifier and Type | Method and Description |
---|---|
void |
closeConnection() |
void |
initializeConsumer()
Create the NATS connection and poll messages.
|
void |
initializeMessageListener()
Initialize the message listener to use (Core NATS or NATS Streaming).
|
void |
registerHandler(NatsInjectHandler injectHandler)
Register a handler to implement injection of the retrieved message.
|
public NatsMessageConsumer(Properties natsProperties, String inboundEndpointName)
public void initializeMessageListener()
public void initializeConsumer() throws IOException, InterruptedException, TimeoutException
public void closeConnection()
public void registerHandler(NatsInjectHandler injectHandler)
injectHandler
- the injectHandlerCopyright © 2022 WSO2. All rights reserved.