io.quarkiverse.reactive.messaging.nats.jetstream.mapper.HeaderMapper Maven / Gradle / Ivy
package io.quarkiverse.reactive.messaging.nats.jetstream.mapper;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.nats.client.impl.Headers;
public class HeaderMapper {
public static Map> toMessageHeaders(Headers headers) {
final var result = new HashMap>();
if (headers != null) {
headers.entrySet().forEach(entry -> result.put(entry.getKey(), entry.getValue()));
}
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy