spring-amqp

Use Property Placeholder with Spring AMQP @SendTo Annotation

混江龙づ霸主 提交于 2019-12-11 11:18:44
问题 I have the same problem mentioned in this unanswered question: Spring Cloud AWS SQS SendTo annotation with property placeholder But, I'm asking it again more succinctly in hopes that it will be answered this time. As mentioned in the question I had referred to, this issue: https://github.com/spring-cloud/spring-cloud-aws/issues/65 seems to indicated that the @SentTo annotation should support property placeholders. However, when it comes to the @SendTo annotation, the Spring AMQP documentation

Can we run multiple job instances of same job with different parameters at the same time using Spring batch partitioning and rabbitmq

有些话、适合烂在心里 提交于 2019-12-11 11:05:57
问题 I have implemented my batch jobs using spring batch partitioning and using rabbitmq as a middle ware. I studied documentation and referred to these unit tests https://github.com/sshcherbakov/spring-batch-talk/blob/master/src/main/resources/META-INF/master.xml https://github.com/sshcherbakov/spring-batch-talk/blob/master/src/main/resources/META-INF/slave.xml I can run my job steps concurrently but I am bit worried about how it will work if I launch multiple instances of same job at the same

How to gracefully stop consuming messages with @RabbitListener

旧时模样 提交于 2019-12-11 10:15:48
问题 Is there a way to gracefully stop a ListenerContainer , and its associated Consumers . What I'm trying to achieve. Stop consuming messages. Gracefully stop ListenerContainer . Await long running consumers, and ack when finished. I'm able to stop the ListenerContainers using consumer.stop() , but active long running consumers won't complete successfully, and processed messages won't be acked and will therefore be processed again, once the ListenerContainer has been resumed. Output Waiting for

SimpleMessageListenerContainer bulk message processing

拥有回忆 提交于 2019-12-11 09:52:12
问题 I have a stream of incoming data that is sent to RabbitMQ as individual messages. I want to send these to a service that requires a batch of messages. I need to send the request to the service when I either have a batch of 1000 messages or when 5 seconds have expired. Is this possible using SimpleMessageListenerContainer? The SimpleMessageListenerContainer supports transactions, however this won't help with the 5 second timeout. I did look at the method doReceiveAndExecute

Is there any configuration to connect to queue with same name on different broker on failure?

霸气de小男生 提交于 2019-12-11 08:54:21
问题 I just want to know if there is configuration property in spring-amqp to auto connect to the hosts given in application property file which has same queue name! For example, I have around 20 queues that will be used to publish and consume by around 10 small spring boot applications in a VM(server1) and if some things happens to queues/rabbitmq node on server1, then it should connect to same set of queues on server2 (whose host/addresses could be given application.property file - clustered/

Spring Cloud AWS SQS SendTo annotation with property placeholder

老子叫甜甜 提交于 2019-12-11 08:37:15
问题 This issue suggests that the @SendTo annotation supports property placeholders, but I can't get it to work. Here's some simplified code snippets of what I'm trying to do (easier than trying to explain with words). I'm on spring-cloud-aws version 1.2.1. This works: @Component public class InputQueueListener { @Value("${replyQueueProperty}") private String replyQueue; @Autowired private QueueMessagingTemplate messagingTemplate; @SqsListener(value = "${inputQueueProperty}", deletionPolicy =

Integration tests with RabbitMQ

倖福魔咒の 提交于 2019-12-11 08:07:27
问题 Currently i'm working on some Spring Boot 2.x application interacting w/ RabbitMQ. I'd like to create an integration test to test the whole app. logic, including interaction w/ Rabbit. So far i need a light-weight stand-alone implementation of AMQP standart to make Spring Boot work w/ it, including sending & receiving messages. I had a look at Qpid sample here but it needs RabbitMQ running somewhere what is not very good for my IT. Are there some another mature light-weight stand-alone AMQP

Spring integration - channel adapter vs. gateway (AMQP)

那年仲夏 提交于 2019-12-11 05:47:50
问题 I'm confused about the difference of Channel Adapters and Gateways in spring integration. As stated in https://stackoverflow.com/a/29992267/467944 by @gary-russell channel adapters are un-diirectional while gateways are bi-directional. If this is the case, why there is a amqp inbound gateway as well as an amqp outbound gateway? What I'm trying to accomplish in the end is the following: Http request received within a controller place message on amqp queue consumer consumes messages and put

How to send basicAck to inbound adapter after publisher confirm from outbound adapter

久未见 提交于 2019-12-11 03:26:16
问题 We have an inbound channel adapter that receives notifications of an event. The complexity of the consumer's criteria restrict our ability to use a simple routing key to distribute the messages, so the application uses a splitter to send that message to interested subscriber's queues via a direct exchange. We want to use publisher confirms on our outbound channel adapter the ensure delivery to the client queues. We want to wait for the publisher confirm to ack the original message, and if a

logging messages on retry of rabbit message

旧街凉风 提交于 2019-12-11 03:01:52
问题 We're using RabbitMQ in our application to queue payment requests, and have another queue to send results back to the caller. In both cases, the client has requested a retry policy that will retry forever, but will put something in the log on each retry like "Retrying transaction for the xth time..." so that an external system can detect stuff backing up by monitoring the log file. I'm creating listener container thus: public SimpleMessageListenerContainer paymentListenerContainer() { final