void deserialize()

in flink-connector-rabbitmq/src/main/java/org/apache/flink/streaming/connectors/rabbitmq/RMQDeserializationSchema.java [65:103]


    void deserialize(
            Envelope envelope,
            AMQP.BasicProperties properties,
            byte[] body,
            RMQCollector<T> collector)
            throws IOException;

    /**
     * Method to decide whether the element signals the end of the stream. If true is returned the
     * element won't be emitted.
     *
     * @param nextElement The element to test for the end-of-stream signal.
     * @return True, if the element signals end of stream, false otherwise.
     */
    boolean isEndOfStream(T nextElement);

    /**
     * Special collector for RMQ messages.
     *
     * <p>It extends the {@link Collector} to give the ability to collect more than 1 message and
     * the ability to set the message correlationId and deliveryTag.
     */
    interface RMQCollector<T> extends Collector<T> {
        /**
         * Sets the correlation id and the delivery tag that corresponds to the records originating
         * from the RMQ event. If the correlation id has been processed before, records will not be
         * emitted downstream.
         *
         * <p>If not set explicitly, the {@link AMQP.BasicProperties#getCorrelationId()} and {@link
         * Envelope#getDeliveryTag()} will be used.
         *
         * <p><b>NOTE:</b>Can be called once for a single invocation of a {@link
         * RMQDeserializationSchema#deserialize(Envelope, AMQP.BasicProperties, byte[],
         * RMQCollector)} method.
         *
         * @return true, if a message with given correlationId was seen before
         */
        boolean setMessageIdentifiers(String correlationId, long deliveryTag);
    }