Interface RabbitStreamOperations
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
RabbitStreamTemplate
public interface RabbitStreamOperations extends java.lang.AutoCloseable
Provides methods for sending messages using a RabbitMQ Stream producer.- Since:
- 2.4
- Author:
- Gary Russell
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
ListenableFuture<java.lang.Boolean>
convertAndSend(java.lang.Object message)
Convert to and send a Spring AMQP message.ListenableFuture<java.lang.Boolean>
convertAndSend(java.lang.Object message, MessagePostProcessor mpp)
Convert to and send a Spring AMQP message.com.rabbitmq.stream.MessageBuilder
messageBuilder()
Return the producer'sMessageBuilder
to create native stream messages.MessageConverter
messageConverter()
Return the message converter.ListenableFuture<java.lang.Boolean>
send(com.rabbitmq.stream.Message message)
Send a native stream message.ListenableFuture<java.lang.Boolean>
send(Message message)
Send a Spring AMQP message.StreamMessageConverter
streamMessageConverter()
Return the stream message converter.
-
-
-
Method Detail
-
send
ListenableFuture<java.lang.Boolean> send(Message message)
Send a Spring AMQP message.- Parameters:
message
- the message.- Returns:
- a future to indicate success/failure.
-
convertAndSend
ListenableFuture<java.lang.Boolean> convertAndSend(java.lang.Object message)
Convert to and send a Spring AMQP message.- Parameters:
message
- the payload.- Returns:
- a future to indicate success/failure.
-
convertAndSend
ListenableFuture<java.lang.Boolean> convertAndSend(java.lang.Object message, @Nullable MessagePostProcessor mpp)
Convert to and send a Spring AMQP message. If aMessagePostProcessor
is provided and returnsnull
, the message is not sent and the future is completed withfalse
.- Parameters:
message
- the payload.mpp
- a message post processor.- Returns:
- a future to indicate success/failure.
-
send
ListenableFuture<java.lang.Boolean> send(com.rabbitmq.stream.Message message)
Send a native stream message.- Parameters:
message
- the message.- Returns:
- a future to indicate success/failure.
- See Also:
messageBuilder()
-
messageBuilder
com.rabbitmq.stream.MessageBuilder messageBuilder()
Return the producer'sMessageBuilder
to create native stream messages.- Returns:
- the builder.
- See Also:
send(com.rabbitmq.stream.Message)
-
messageConverter
MessageConverter messageConverter()
Return the message converter.- Returns:
- the converter.
-
streamMessageConverter
StreamMessageConverter streamMessageConverter()
Return the stream message converter.- Returns:
- the converter;
-
close
default void close() throws AmqpException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
AmqpException
-
-