public class NatsMessageProducer extends Object implements org.springframework.integration.core.MessageProducer, org.springframework.context.Lifecycle
| Modifier and Type | Field and Description |
|---|---|
static String |
SUBJECT
The NATS subject for incoming message is stored in the SUBJECT header.
|
| Constructor and Description |
|---|
NatsMessageProducer(NatsConsumerDestination destination,
io.nats.client.Connection nc)
Create a message producer.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.messaging.MessageChannel |
getOutputChannel() |
boolean |
isRunning() |
void |
setOutputChannel(org.springframework.messaging.MessageChannel outputChannel) |
void |
start() |
void |
stop() |
public static final String SUBJECT
public NatsMessageProducer(NatsConsumerDestination destination, io.nats.client.Connection nc)
destination - where to subscribenc - NATS connectionpublic org.springframework.messaging.MessageChannel getOutputChannel()
getOutputChannel in interface org.springframework.integration.core.MessageProducerpublic void setOutputChannel(org.springframework.messaging.MessageChannel outputChannel)
setOutputChannel in interface org.springframework.integration.core.MessageProducerpublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.LifecycleCopyright © 2022 CNCF. All rights reserved.