@Internal public class SolaceMessageProducer extends java.lang.Object implements MessageProducer
Constructor and Description |
---|
SolaceMessageProducer(XMLMessageProducer producer) |
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 record,
Destination topicOrQueue,
boolean useCorrelationKeyLatency,
DeliveryMode deliveryMode)
Publishes a message to the broker.
|
public SolaceMessageProducer(XMLMessageProducer producer)
public void publishSingleMessage(Solace.Record record, Destination topicOrQueue, boolean useCorrelationKeyLatency, DeliveryMode deliveryMode)
MessageProducer
publishSingleMessage
in interface MessageProducer
public int publishBatch(java.util.List<Solace.Record> records, boolean useCorrelationKeyLatency, SerializableFunction<Solace.Record,Destination> destinationFn, DeliveryMode deliveryMode)
MessageProducer
The size of the batch cannot exceed 50 messages, this is a limitation of the Solace API.
It returns the number of messages written.
publishBatch
in interface MessageProducer
public boolean isClosed()
MessageProducer
isClosed
in interface MessageProducer
public void close()
MessageProducer
close
in interface MessageProducer