Class PulsarOutgoingMessage<T>
java.lang.Object
io.smallrye.reactive.messaging.pulsar.PulsarOutgoingMessage<T>
- All Implemented Interfaces:
ContextAwareMessage<T>,PulsarMessage<T>,org.eclipse.microprofile.reactive.messaging.Message<T>
public class PulsarOutgoingMessage<T>
extends Object
implements PulsarMessage<T>, ContextAwareMessage<T>
-
Field Summary
Fields inherited from interface org.eclipse.microprofile.reactive.messaging.Message
EMPTY_ACK, EMPTY_NACK, LOGGER -
Constructor Summary
ConstructorsConstructorDescriptionPulsarOutgoingMessage(T payload, Function<org.eclipse.microprofile.reactive.messaging.Metadata, CompletionStage<Void>> ack, BiFunction<Throwable, org.eclipse.microprofile.reactive.messaging.Metadata, CompletionStage<Void>> nack) PulsarOutgoingMessage(T payload, Function<org.eclipse.microprofile.reactive.messaging.Metadata, CompletionStage<Void>> ack, BiFunction<Throwable, org.eclipse.microprofile.reactive.messaging.Metadata, CompletionStage<Void>> nack, PulsarOutgoingMessageMetadata outgoingMessageMetadata) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> PulsarOutgoingMessage<T>from(org.eclipse.microprofile.reactive.messaging.Message<T> message) Creates a new outgoing Pulsar message.Function<org.eclipse.microprofile.reactive.messaging.Metadata,CompletionStage<Void>> longgetKey()byte[]org.eclipse.microprofile.reactive.messaging.MetadataBiFunction<Throwable,org.eclipse.microprofile.reactive.messaging.Metadata, CompletionStage<Void>> byte[]longbooleanhasKey()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.smallrye.reactive.messaging.providers.locals.ContextAwareMessage
getContextMetadata, runOnMessageContextMethods inherited from interface org.eclipse.microprofile.reactive.messaging.Message
ack, ack, addMetadata, getAck, getMetadata, getNack, nack, nack, thenApply, unwrap, withAck, withAckWithMetadata, withMetadata, withMetadata, withNack, withNackWithMetadata, withPayload
-
Constructor Details
-
PulsarOutgoingMessage
public PulsarOutgoingMessage(T payload, Function<org.eclipse.microprofile.reactive.messaging.Metadata, CompletionStage<Void>> ack, BiFunction<Throwable, org.eclipse.microprofile.reactive.messaging.Metadata, CompletionStage<Void>> nack) -
PulsarOutgoingMessage
public PulsarOutgoingMessage(T payload, Function<org.eclipse.microprofile.reactive.messaging.Metadata, CompletionStage<Void>> ack, BiFunction<Throwable, org.eclipse.microprofile.reactive.messaging.Metadata, CompletionStage<Void>> nack, PulsarOutgoingMessageMetadata outgoingMessageMetadata)
-
-
Method Details
-
from
public static <T> PulsarOutgoingMessage<T> from(org.eclipse.microprofile.reactive.messaging.Message<T> message) Description copied from interface:PulsarMessageCreates a new outgoing Pulsar message.- Type Parameters:
T- the type of the value- Parameters:
message- the incoming message- Returns:
- the new outgoing Pulsar message
-
getPayload
- Specified by:
getPayloadin interfaceorg.eclipse.microprofile.reactive.messaging.Message<T>
-
getKey
- Specified by:
getKeyin interfacePulsarMessage<T>
-
getKeyBytes
public byte[] getKeyBytes()- Specified by:
getKeyBytesin interfacePulsarMessage<T>
-
hasKey
public boolean hasKey()- Specified by:
hasKeyin interfacePulsarMessage<T>
-
getOrderingKey
public byte[] getOrderingKey()- Specified by:
getOrderingKeyin interfacePulsarMessage<T>
-
getProperties
- Specified by:
getPropertiesin interfacePulsarMessage<T>
-
getEventTime
public long getEventTime()- Specified by:
getEventTimein interfacePulsarMessage<T>
-
getSequenceId
public long getSequenceId()- Specified by:
getSequenceIdin interfacePulsarMessage<T>
-
getMetadata
public org.eclipse.microprofile.reactive.messaging.Metadata getMetadata()- Specified by:
getMetadatain interfaceorg.eclipse.microprofile.reactive.messaging.Message<T>
-
getAckWithMetadata
public Function<org.eclipse.microprofile.reactive.messaging.Metadata,CompletionStage<Void>> getAckWithMetadata()- Specified by:
getAckWithMetadatain interfaceorg.eclipse.microprofile.reactive.messaging.Message<T>
-
getNackWithMetadata
public BiFunction<Throwable,org.eclipse.microprofile.reactive.messaging.Metadata, getNackWithMetadata()CompletionStage<Void>> - Specified by:
getNackWithMetadatain interfaceorg.eclipse.microprofile.reactive.messaging.Message<T>
-