@Internal public interface MessageProducer
Implementations of this interface are responsible for managing the connection to the broker and for publishing messages to the broker.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the message producer.
|
boolean |
isClosed()
Returns true if the message producer is closed, false otherwise.
|
int |
publishBatch(java.util.List<Solace.Record> records,
boolean useCorrelationKeyLatency,
SerializableFunction<Solace.Record,Destination> destinationFn,
DeliveryMode deliveryMode)
Publishes a batch of messages to the broker.
|
void |
publishSingleMessage(Solace.Record msg,
Destination topicOrQueue,
boolean useCorrelationKeyLatency,
DeliveryMode deliveryMode)
Publishes a message to the broker.
|
void publishSingleMessage(Solace.Record msg, Destination topicOrQueue, boolean useCorrelationKeyLatency, DeliveryMode deliveryMode)
int publishBatch(java.util.List<Solace.Record> records, boolean useCorrelationKeyLatency, SerializableFunction<Solace.Record,Destination> destinationFn, DeliveryMode deliveryMode)
The size of the batch cannot exceed 50 messages, this is a limitation of the Solace API.
It returns the number of messages written.
boolean isClosed()
void close()