public class QueueMessagingTemplate extends AbstractMessageChannelMessagingSendingTemplate<QueueMessageChannel> implements DestinationResolvingMessageReceivingOperations<QueueMessageChannel>
StringMessageConverter as it fits the underlying message channel type. If a
message converter is set through the constructor then it is added to a composite
converter already containing the StringMessageConverter. If
AbstractMessageSendingTemplate.setMessageConverter(MessageConverter) is used, then the
CompositeMessageConverter containing the StringMessageConverter will
not be used anymore and the String payloads are also going to be converted with
the set converter.CONVERSION_HINT_HEADER, logger| Constructor and Description |
|---|
QueueMessagingTemplate(com.amazonaws.services.sqs.AmazonSQSAsync amazonSqs) |
QueueMessagingTemplate(com.amazonaws.services.sqs.AmazonSQSAsync amazonSqs,
DestinationResolver<String> destinationResolver,
MessageConverter messageConverter)
Initializes the messaging template by configuring the destination resolver as well
as the message converter.
|
QueueMessagingTemplate(com.amazonaws.services.sqs.AmazonSQSAsync amazonSqs,
ResourceIdResolver resourceIdResolver) |
QueueMessagingTemplate(com.amazonaws.services.sqs.AmazonSQSAsync amazonSqs,
ResourceIdResolver resourceIdResolver,
MessageConverter messageConverter)
Initializes the messaging template by configuring the resource Id resolver as well
as the message converter.
|
| Modifier and Type | Method and Description |
|---|---|
Message<?> |
receive() |
Message<?> |
receive(QueueMessageChannel destination) |
Message<?> |
receive(String destinationName) |
<T> T |
receiveAndConvert(Class<T> targetClass) |
<T> T |
receiveAndConvert(QueueMessageChannel destination,
Class<T> targetClass) |
<T> T |
receiveAndConvert(String destinationName,
Class<T> targetClass) |
protected QueueMessageChannel |
resolveMessageChannel(String physicalResourceIdentifier) |
convertAndSend, convertAndSend, convertAndSend, convertAndSend, doSend, initMessageConverter, resolveMessageChannelByLogicalName, send, setDefaultDestinationNameconvertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, doConvert, getDefaultDestination, getMessageConverter, getRequiredDefaultDestination, processHeadersToSend, send, send, setDefaultDestination, setMessageConverterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, send, sendpublic QueueMessagingTemplate(com.amazonaws.services.sqs.AmazonSQSAsync amazonSqs)
public QueueMessagingTemplate(com.amazonaws.services.sqs.AmazonSQSAsync amazonSqs,
ResourceIdResolver resourceIdResolver)
public QueueMessagingTemplate(com.amazonaws.services.sqs.AmazonSQSAsync amazonSqs,
ResourceIdResolver resourceIdResolver,
MessageConverter messageConverter)
DynamicQueueUrlDestinationResolver with
the default configuration to resolve destination names.amazonSqs - The AmazonSQS client, cannot be null.resourceIdResolver - The ResourceIdResolver to be used for resolving
logical queue names.messageConverter - A MessageConverter that is going to be added to the
composite converter.public QueueMessagingTemplate(com.amazonaws.services.sqs.AmazonSQSAsync amazonSqs,
DestinationResolver<String> destinationResolver,
MessageConverter messageConverter)
DynamicQueueUrlDestinationResolver with
the default configuration to resolve destination names.amazonSqs - The AmazonSQS client, cannot be null.destinationResolver - A destination resolver implementation to resolve queue
names into queue urls. The destination resolver will be wrapped into a
CachingDestinationResolverProxy to avoid
duplicate queue url resolutions.messageConverter - A MessageConverter that is going to be added to the
composite converter.protected QueueMessageChannel resolveMessageChannel(String physicalResourceIdentifier)
resolveMessageChannel in class AbstractMessageChannelMessagingSendingTemplate<QueueMessageChannel>public Message<?> receive() throws MessagingException
receive in interface MessageReceivingOperations<QueueMessageChannel>MessagingExceptionpublic Message<?> receive(QueueMessageChannel destination) throws MessagingException
receive in interface MessageReceivingOperations<QueueMessageChannel>MessagingExceptionpublic <T> T receiveAndConvert(Class<T> targetClass) throws MessagingException
receiveAndConvert in interface MessageReceivingOperations<QueueMessageChannel>MessagingExceptionpublic <T> T receiveAndConvert(QueueMessageChannel destination, Class<T> targetClass) throws MessagingException
receiveAndConvert in interface MessageReceivingOperations<QueueMessageChannel>MessagingExceptionpublic Message<?> receive(String destinationName) throws MessagingException
receive in interface DestinationResolvingMessageReceivingOperations<QueueMessageChannel>MessagingExceptionpublic <T> T receiveAndConvert(String destinationName, Class<T> targetClass) throws MessagingException
receiveAndConvert in interface DestinationResolvingMessageReceivingOperations<QueueMessageChannel>MessagingExceptionCopyright © 2021 Pivotal Software, Inc.. All rights reserved.