
org.mvnsearch.spring.boot.nats.cloudevents.NatsCloudEventsConstants Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nats-spring-boot-starter Show documentation
Show all versions of nats-spring-boot-starter Show documentation
Spring Boot starter NATS with publish/subscribe, KeyValue, Object Store,
Durable Component, Services framework etc. support.
package org.mvnsearch.spring.boot.nats.cloudevents;
import io.cloudevents.core.message.impl.MessageUtils;
import java.util.Map;
/**
* Constants and methods used throughout the NATS binding for cloud events.
*
* @author linux_china
*/
public class NatsCloudEventsConstants {
/**
* The prefix name for CloudEvent attributes for use in properties of a NATS message.
* please refer https://github.com/cloudevents/spec/blob/main/cloudevents/bindings/nats-protocol-binding.md
*/
static final String CE_PREFIX = "ce-";
static final Map ATTRIBUTES_TO_PROPERTY_NAMES = MessageUtils.generateAttributesToHeadersMapping(CEA -> CE_PREFIX + CEA);
static final String PROPERTY_CONTENT_TYPE = "ce-contenttype";
static final String MESSAGE_PROPERTY_SPEC_VERSION = ATTRIBUTES_TO_PROPERTY_NAMES.get("specversion");
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy