I’ve got an issue connecting to an ActiveMQ Artemis cluster (AMQ from Red Hat in fact) through Spring’s DefaultJmsListenerContainerFactory. DefaultMessageListenerContainer makes use of only one connection, regardless of the number of consumers you specify through the concurrency parameter. The problem is that, in the cluster, there are 3 brokers configured at the moment (and, as a dev, I shouldn’t care
Tag: spring-jms
How to replace an old ibm mq batch V7
I’m wondering what is the best way to replace and old ibm batch java application: In fact , I have a java application which contains basically two classes and can be started using two shell files; a shell to send and message and another one to consume messages present in the Queue. sendMessage.ksh => start the application and calls send
How can I acknowledge a JMS message on another thread and request for redelivery of unacknowledged messages?
Step 1: I need to receive message by one thread. Step 2: Process and sending ack and redelivery request (throwing exception) by another thread. Sample code: Now another thread will start and process the list which contains data then how can I send an acknowledgement or throw an exception for redelivery? Answer Typically you’d let your framework (e.g. Spring) deal
spring-jms – listener exchange and bind queue by jms configuration
I have a project with spring-jms I’m trying work with exchanges. I created 4 listeners and all of them are been bound into exchange named ‘jms.durable.queues’ by default. Even thought I create my own exchanges and binding my queues manually on rabbit console, spring is creating a default exchange. How could I create my own queues and bind into my
invalid stream header – when publishing message manually on rabbitmq console
I have an application with spring-jms, spring-boot and rabbitmq-jms. When I try send a message and recieve by application runs successfully. But when I publish message manually on rabbitmq console I got error bellow on application listening: This is my JMS configuration Publishing message Consuming message libs Why do I need add on properties or headers on rabbit console for
Stop receiving again and again messages in consumer of the queue when an exception occurs in Spring JMS
I send a message from the sender application as below. And in the receiver application, I receive the message as below. The main problem is when the validateEventRequest(event); has called. Because in this method, I have several services and scenarios that might raise an exception. I don’t want if an exception threw, the message rollback to the queue and receive
Connect to IBM MQ using JmsListener
I have a Spring application and I want to connect to IBM MQ using JmsListener. This is my configuration: This is my consumer: I have deployed the application into TomEE plus container, and I have sent few messages to the queue: I have also added the below entries in the servlet-context.xml However, application did not consume these messages. How do
ActiveMQ Artemis queue deleted after shutdown of consuming client
I am newbie on JMS and ActiveMQ Artemis, and I have the following problem. I put a message in a requests queue normally from an application producer: After that from other application consumer I tried to consume that message. That works without problems. But when I shutdown the application consumer the request queue was deleted for no reason. My application
Spring and JMS DynamicDestinationResolution
I am using the latest Spring 4 and ActiveMQ to put JMS messages on a queue. Using the JMSTemplate, I have a default queue, and the sample code I have lets me put a message on the default queue with no issues. There is also a sample code that lets me put a message on a Destination … this is
Spring JMS(ActiveMQ) delayed delivery of messages
We’re trying to set a delay on some JMS messages, so that a message will only be added to the queue/ received by the listener after x time. So far we’ve tried 2 approaches that didn’t work. 1) According to the spring documentation, we can set the delivery delay on the JMSTemplate. This is the sample code we tried: However,