K
- key type to sendM
- message type to sendpublic final class TopicProducerImpl<K,M> extends Object implements TopicProducer<K,M>
Producer
.Constructor and Description |
---|
TopicProducerImpl(String updateBroker,
String topic,
boolean async) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getTopic() |
String |
getUpdateBroker() |
void |
send(K key,
M message) |
public String getUpdateBroker()
getUpdateBroker
in interface TopicProducer<K,M>
public String getTopic()
getTopic
in interface TopicProducer<K,M>
public void send(K key, M message)
send
in interface TopicProducer<K,M>
key
- key to send to the topicmessage
- message to send with key to the topicpublic void close()
close
in interface TopicProducer<K,M>
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2014–2018. All rights reserved.