io.quarkiverse.reactive.messaging.nats.jetstream.mapper.PayloadMapper Maven / Gradle / Ivy
package io.quarkiverse.reactive.messaging.nats.jetstream.mapper;
import java.util.Optional;
import io.nats.client.api.MessageInfo;
public interface PayloadMapper {
byte[] of(Object payload);
T of(byte[] data, Class type);
Optional of(io.nats.client.Message message);
Optional of(MessageInfo message);
default T of(io.nats.client.Message message, Class payLoadType) {
return of(message.getData(), payLoadType);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy