T - The output type of the RMQSource@PublicEvolving public interface RMQDeserializationSchema<T> extends Serializable, org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>
| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
RMQDeserializationSchema.RMQCollector<T>
Special collector for RMQ messages.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
deserialize(com.rabbitmq.client.Envelope envelope,
com.rabbitmq.client.AMQP.BasicProperties properties,
byte[] body,
RMQDeserializationSchema.RMQCollector<T> collector)
This method takes all the RabbitMQ delivery information supplied by the client extract the
data and pass it to the collector.
|
boolean |
isEndOfStream(T nextElement)
Method to decide whether the element signals the end of the stream.
|
default void |
open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context)
Initialization method for the schema.
|
default void open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context)
throws Exception
deserialize(com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[], org.apache.flink.streaming.connectors.rabbitmq.RMQDeserializationSchema.RMQCollector<T>) and thus suitable for one time setup work.
The provided DeserializationSchema.InitializationContext can be used to access
additional features such as e.g. registering user metrics.
context - Contextual information that can be used during initialization.Exceptionvoid deserialize(com.rabbitmq.client.Envelope envelope,
com.rabbitmq.client.AMQP.BasicProperties properties,
byte[] body,
RMQDeserializationSchema.RMQCollector<T> collector)
throws IOException
NOTICE: The implementation of this method can call RMQDeserializationSchema.RMQCollector.setMessageIdentifiers(java.lang.String, long) with a custom correlation ID and delivery tag if
checkpointing and useCorrelationID were enabled in the constructor of RMQSource.
envelope - an AMQP Envelope.properties - the AMQP.BasicProperties of the message.body - the message itself as a byte array.collector - the RMQDeserializationSchema.RMQCollector that will collect the data.IOException - When the body of the message can't be parsedboolean isEndOfStream(T nextElement)
nextElement - The element to test for the end-of-stream signal.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.