@ApplicationScoped public class IndyKafkaProducer extends Object
| Constructor and Description |
|---|
IndyKafkaProducer(Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush()
Flush all the non-blocking send messages so that the consumers can see them.
|
void |
send(String topic,
String message)
Non-blocking send.
|
void |
send(String topic,
String message,
LogbackFormatter formatter)
Non-blocking send with a logback formatter to format the message.
|
void |
send(String topic,
String message,
LogbackFormatter formatter,
long timeoutMillis)
Blocking send with a logback formatter to format the message.
|
void |
send(String topic,
String message,
long timeoutMillis)
Blocking send.
|
public IndyKafkaProducer(Properties properties)
public void send(String topic, String message) throws IOException
IOExceptionpublic void send(String topic, String message, LogbackFormatter formatter) throws IOException
IOExceptionpublic void send(String topic, String message, long timeoutMillis) throws IOException, InterruptedException, ExecutionException, TimeoutException
public void send(String topic, String message, LogbackFormatter formatter, long timeoutMillis) throws IOException, InterruptedException, ExecutionException, TimeoutException
public void flush()
@PreDestroy public void close() throws IOException
IOExceptionCopyright © 2011-2020-2020. All Rights Reserved.