public static class SolaceIO.Read<T> extends PTransform<PBegin,PCollection<T>>
annotations, displayData, name, resourceHints| Constructor and Description |
|---|
Read(org.apache.beam.sdk.io.solace.SolaceIO.Read.Configuration.Builder<T> configurationBuilder) |
| Modifier and Type | Method and Description |
|---|---|
PCollection<T> |
expand(PBegin input)
Override this method to specify how this
PTransform should be expanded on the given
InputT. |
SolaceIO.Read<T> |
from(Solace.Queue queue)
Set the queue name to read from.
|
SolaceIO.Read<T> |
from(Solace.Topic topic)
Set the topic name to read from.
|
void |
validate(@Nullable PipelineOptions options)
Called before running the Pipeline to verify this transform is fully and correctly specified.
|
SolaceIO.Read<T> |
withDeduplicateRecords(boolean deduplicateRecords)
Optional, default: false.
|
SolaceIO.Read<T> |
withMaxNumConnections(java.lang.Integer maxNumConnections)
Optional.
|
SolaceIO.Read<T> |
withSempClientFactory(SempClientFactory sempClientFactory)
Set a factory that creates a
SempClientFactory. |
SolaceIO.Read<T> |
withSessionServiceFactory(SessionServiceFactory sessionServiceFactory)
Set a factory that creates a
SessionService. |
SolaceIO.Read<T> |
withTimestampFn(SerializableFunction<T,Instant> timestampFn)
The timestamp function, used for estimating the watermark, mapping the record T to an
Instant |
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validatepublic Read(org.apache.beam.sdk.io.solace.SolaceIO.Read.Configuration.Builder<T> configurationBuilder)
public SolaceIO.Read<T> from(Solace.Queue queue)
public SolaceIO.Read<T> from(Solace.Topic topic)
public SolaceIO.Read<T> withTimestampFn(SerializableFunction<T,Instant> timestampFn)
Instant
Optional when using the no-arg SolaceIO.read() method. Defaults to SolaceIO.SENDER_TIMESTAMP_FUNCTION. When using the SolaceIO.read(TypeDescriptor,
SerializableFunction, SerializableFunction) method, the function mapping from T to Instant has to be passed as an argument.
public SolaceIO.Read<T> withMaxNumConnections(java.lang.Integer maxNumConnections)
public SolaceIO.Read<T> withDeduplicateRecords(boolean deduplicateRecords)
XMLMessage.getApplicationMessageId() of the incoming BytesXMLMessage. If the
field is null, then the XMLMessage.getReplicationGroupMessageId() will be used,
which is always set by Solace.public SolaceIO.Read<T> withSempClientFactory(SempClientFactory sempClientFactory)
SempClientFactory.
The factory `create()` method is invoked in each instance of an UnboundedSolaceReader. Created SempClient has to communicate with broker management
API. It must support operations such as:
An existing implementation of the SempClientFactory includes BasicAuthSempClientFactory which implements connection
to the SEMP with the Basic Authentication method.
To use it, specify the credentials with the builder methods.
The format of the host is `[Protocol://]Host[:Port]`
.withSempClientFactory(
BasicAuthSempClientFactory.builder()
.host("your-host-name-with-protocol") // e.g. "http://12.34.56.78:8080"
.username("username")
.password("password")
.vpnName("vpn-name")
.build())
public SolaceIO.Read<T> withSessionServiceFactory(SessionServiceFactory sessionServiceFactory)
SessionService.
The factory `create()` method is invoked in each instance of an UnboundedSolaceReader. Created SessionService has
to be able to:
MessageReceiver.
An existing implementation of the SempClientFactory includes BasicAuthJcsmpSessionService which implements the Basic
Authentication to Solace. *
To use it, specify the credentials with the builder methods. *
The host is the IPv4 or IPv6 or host name of the appliance. IPv6 addresses must be encoded in brackets ([]). For example, "12.34.56.78", or "[fe80::1]". If connecting to a non-default port, it can be specified here using the "Host:Port" format. For example, "12.34.56.78:4444", or "[fe80::1]:4444".
BasicAuthJcsmpSessionServiceFactory.builder()
.host("your-host-name")
// e.g. "12.34.56.78", or "[fe80::1]", or "12.34.56.78:4444"
.username("semp-username")
.password("semp-password")
.vpnName("vpn-name")
.build()));
public void validate(@Nullable PipelineOptions options)
PTransformBy default, does nothing.
validate in class PTransform<PBegin,PCollection<T>>public PCollection<T> expand(PBegin input)
PTransformPTransform should be expanded on the given
InputT.
NOTE: This method should not be called directly. Instead apply the PTransform should
be applied to the InputT using the apply method.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand in class PTransform<PBegin,PCollection<T>>