@Beta public interface MessagingContext
Modifier and Type | Method and Description |
---|---|
MessagePublisher |
getDirectMessagePublisher()
Returns an instance of
MessagePublisher for publishing messages without a transaction. |
MessageFetcher |
getMessageFetcher()
Returns an instance of
MessageFetcher for fetching messages. |
MessagePublisher |
getMessagePublisher()
Returns an instance of
MessagePublisher for publishing messages. |
MessagePublisher getMessagePublisher()
MessagePublisher
for publishing messages.
Messages will be published transactionally if any of the publish
methods in the MessagePublisher
are called from a transactional context (either through Implicit Transaction Control
, or Transactional.execute(TxRunnable)
when Explicit Transaction
Control
is used).
When those publish
methods are called without a transactional context, the message will
be published without a transaction.
MessagePublisher
. The returned instance cannot be shared
across multiple threads.MessagePublisher getDirectMessagePublisher()
MessagePublisher
for publishing messages without a transaction.
Messages published through the resulting MessagePublisher
are always published without
using a transaction and are immediately available for consumption.
MessagePublisher
. The returned instance is safe to be used
from multiple threads.MessageFetcher getMessageFetcher()
MessageFetcher
for fetching messages.
Messages will be fetched transactionally if any of the fetch
methods in the MessageFetcher
are called from a transactional context (either through Implicit Transaction Control
, or Transactional.execute(TxRunnable)
when Explicit Transaction
Control
is used).
When those fetch
methods are called without a transactional context, the message will
be fetched without a transaction.
MessageFetcher
. The returned instance cannot be shared across
multiple threads.Copyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.