All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.redis.datasource.stream.StreamMessage Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
package io.quarkus.redis.datasource.stream;

import java.util.Map;

/**
 * Represents a message received from a stream
 *
 * @param  the type of the key
 * @param  the field type for the payload
 * @param  the value type for the payload
 */
public class StreamMessage {

    private final K stream;
    private final String id;
    private final Map payload;

    public StreamMessage(K stream, String id, Map payload) {
        this.stream = stream;
        this.id = id;
        this.payload = payload;
    }

    /**
     * @return the key of the stream from which the message has been received.
     */
    public K key() {
        return this.stream;
    }

    /**
     * @return the stream id, i.e. the id of the message in the stream.
     */
    public String id() {
        return this.id;
    }

    /**
     * @return the payload of the message
     */
    public Map payload() {
        return this.payload;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy