public abstract static class RabbitMqIO.Read extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<RabbitMqMessage>>
PTransform to consume messages from RabbitMQ server.| Constructor and Description |
|---|
Read() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PCollection<RabbitMqMessage> |
expand(org.apache.beam.sdk.values.PBegin input) |
RabbitMqIO.Read |
withExchange(java.lang.String name,
java.lang.String type,
java.lang.String routingKey)
Instead of consuming messages on a specific queue, you can consume message from a given
exchange.
|
RabbitMqIO.Read |
withMaxNumRecords(long maxNumRecords)
Define the max number of records received by the
RabbitMqIO.Read. |
RabbitMqIO.Read |
withMaxReadTime(org.joda.time.Duration maxReadTime)
Define the max read time (duration) while the
RabbitMqIO.Read will receive messages. |
RabbitMqIO.Read |
withQueue(java.lang.String queue)
If you want to directly consume messages from a specific queue, you just have to specify the
queue name.
|
RabbitMqIO.Read |
withQueueDeclare(boolean queueDeclare)
You can "force" the declaration of a queue on the RabbitMQ broker.
|
RabbitMqIO.Read |
withUri(java.lang.String uri) |
public RabbitMqIO.Read withUri(java.lang.String uri)
public RabbitMqIO.Read withQueue(java.lang.String queue)
withQueueDeclare(boolean).public RabbitMqIO.Read withQueueDeclare(boolean queueDeclare)
queueDeclare - If true, RabbitMqIO will declare the queue. If another
application declare the queue, it's not required.public RabbitMqIO.Read withExchange(java.lang.String name, java.lang.String type, java.lang.String routingKey)
public RabbitMqIO.Read withMaxNumRecords(long maxNumRecords)
RabbitMqIO.Read. When this max number of
records is lower than Long.MAX_VALUE, the RabbitMqIO.Read will provide a bounded PCollection.public RabbitMqIO.Read withMaxReadTime(org.joda.time.Duration maxReadTime)
RabbitMqIO.Read will receive messages. When this
max read time is not null, the RabbitMqIO.Read will provide a bounded PCollection.public org.apache.beam.sdk.values.PCollection<RabbitMqMessage> expand(org.apache.beam.sdk.values.PBegin input)
expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<RabbitMqMessage>>