Class SolaceMessageProducer
java.lang.Object
org.apache.beam.sdk.io.solace.broker.SolaceMessageProducer
- All Implemented Interfaces:
MessageProducer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the message producer.booleanisClosed()Returns true if the message producer is closed, false otherwise.intpublishBatch(List<Solace.Record> records, boolean useCorrelationKeyLatency, SerializableFunction<Solace.Record, Destination> destinationFn, DeliveryMode deliveryMode) Publishes a batch of messages to the broker.voidpublishSingleMessage(Solace.Record record, Destination topicOrQueue, boolean useCorrelationKeyLatency, DeliveryMode deliveryMode) Publishes a message to the broker.
-
Constructor Details
-
SolaceMessageProducer
-
-
Method Details
-
publishSingleMessage
public void publishSingleMessage(Solace.Record record, Destination topicOrQueue, boolean useCorrelationKeyLatency, DeliveryMode deliveryMode) Description copied from interface:MessageProducerPublishes a message to the broker.- Specified by:
publishSingleMessagein interfaceMessageProducer
-
publishBatch
public int publishBatch(List<Solace.Record> records, boolean useCorrelationKeyLatency, SerializableFunction<Solace.Record, Destination> destinationFn, DeliveryMode deliveryMode) Description copied from interface:MessageProducerPublishes a batch of messages to the broker.The size of the batch cannot exceed 50 messages, this is a limitation of the Solace API.
It returns the number of messages written.
- Specified by:
publishBatchin interfaceMessageProducer
-
isClosed
public boolean isClosed()Description copied from interface:MessageProducerReturns true if the message producer is closed, false otherwise.- Specified by:
isClosedin interfaceMessageProducer
-
close
public void close()Description copied from interface:MessageProducerCloses the message producer.- Specified by:
closein interfaceMessageProducer
-