Interface RabbitStreamOperations
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
RabbitStreamTemplate
Provides methods for sending messages using a RabbitMQ Stream producer.
- Since:
- 2.4
- Author:
- Gary Russell
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
convertAndSend
(Object message) Convert to and send a Spring AMQP message.convertAndSend
(Object message, MessagePostProcessor mpp) Convert to and send a Spring AMQP message.com.rabbitmq.stream.MessageBuilder
Return the producer'sMessageBuilder
to create native stream messages.Return the message converter.send
(com.rabbitmq.stream.Message message) Send a native stream message.Send a Spring AMQP message.Return the stream message converter.
-
Method Details
-
send
Send a Spring AMQP message.- Parameters:
message
- the message.- Returns:
- a future to indicate success/failure.
-
convertAndSend
Convert to and send a Spring AMQP message.- Parameters:
message
- the payload.- Returns:
- a future to indicate success/failure.
-
convertAndSend
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
Send a native stream message.- Parameters:
message
- the message.- Returns:
- a future to indicate success/failure.
- See Also:
-
messageBuilder
com.rabbitmq.stream.MessageBuilder messageBuilder()Return the producer'sMessageBuilder
to create native stream messages.- Returns:
- the builder.
- See Also:
-
messageConverter
MessageConverter messageConverter()Return the message converter.- Returns:
- the converter.
-
streamMessageConverter
StreamMessageConverter streamMessageConverter()Return the stream message converter.- Returns:
- the converter;
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
AmqpException
-