io.quarkus.redis.datasource.stream.StreamMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-redis-client Show documentation
Show all versions of quarkus-redis-client Show documentation
Connect to Redis in either imperative or reactive style
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