I have a requirement to consume the messages from the ActiveMQ topic and persist them in mongo. I am wondering if there is a way/configuration for consuming the messages in batch from the topic instead of reading messages one by one and making a DB call for every message. I am imagining the end solution will do something like: Consumes
Tag: jms
ActiveMQ Artemis prefixes “jms.topic.” to all topic names defined on Spring Boot Client
I’m using ActiveMQ Artemis 2.18.0 and version 2.5.5 of the spring-boot-starter-artemis dependency on a Spring Boot client. In my use case clients are required to communicate with each other via topics. The issue is that the string jms.topic. is getting prefixed to every topic defined on the client. For example the topic foo.sendInfo becomes jms.topic.foo.sendInfo. The broker.xml file is as
TOMEEE – Can’t lookup ejb
I have implemented a basic EJB Object in my code. Then I created a jar for this ejb. The jar file contains: package containing the ejb classes (home interface/remote bean interface/bean implementaion) META-INF folder containing the ejb-jar.xml ejb-jar.xml Then I deployed the EJB by placing the jar in webapps folder and from the server logs it seems to have been
Message contains escape character in the message sent to MQ and cause exception when converting to JSON
I have a method: and my DTO’s toString(): I realise when the other application received the MQ message (using Spring Boot with JMS), the escape char appeared, causing errors. I tried to do replaceAll(“\\”, “”) but it couldnt find anything to replace. How can I get rid of the in the message sent to the MQ? Answer The
JMS client to ActiveMQ at server on Red Hat JBoss EAP 7.3 in Java
I am writing a Java client to connect to my JBoss EAP 7.3 server running ActiveMQ, and I am getting various connection responses as I alter the parameters. Please help me correct the parameters/code. I get: This is the Java client code in a try catch block attempting to connect: And these are my JNDI tree values in the EAP
Cannot resolve method ‘getBody’ in Message
I’m quite new in JavaEE and trying to deal with JMS stuff. Here is the MessageBean that implement MessageListener and Override onMessage where I consequently try to receive message from Queue My code snippet: But unfortunately there is an compiling error that method getBody cannot be resolved and marked as red in IntelliJ. Help me figure out. Thanks in advance
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
Better way to wait to receive Async messages in ActiveMQ
I have used ActiveMQ to Send messages and Receive them Asynchronously. There, I’m having a problem with deciding the best way to waiting in the for messages. Sleeping thread in a loop is one option. But it feels doesn’t look good for me. Can anyone suggest a better way for this. AsyncReceiver.java Sender.java Answer There are two ways to process/consume