@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)
MessageProducerpublishSingleMessage in interface MessageProducerpublic int publishBatch(java.util.List<Solace.Record> records, boolean useCorrelationKeyLatency, SerializableFunction<Solace.Record,Destination> destinationFn, DeliveryMode deliveryMode)
MessageProducerThe 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 MessageProducerpublic boolean isClosed()
MessageProducerisClosed in interface MessageProducerpublic void close()
MessageProducerclose in interface MessageProducer