Commit a7be48ee authored by Bhushan Rade's avatar Bhushan Rade
Browse files

message factory logic added

parent 7268eab2
Pipeline #109835 passed with stages
in 3 minutes and 39 seconds
......@@ -8,7 +8,6 @@ import java.util.HashSet;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Session;
......@@ -20,7 +19,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Lazy;
import org.springframework.jms.JmsException;
import org.springframework.jms.core.JmsTemplate;
......@@ -92,6 +90,7 @@ public class ActiveMQFactory implements IMessageFactory {
public void sendMessageToQueue(String queueName, String msg, Long dealy) {
try {
jmsTemplate.setDeliveryDelay(dealy);
jmsTemplate.setPubSubDomain(false);
jmsTemplate.convertAndSend(queueName, msg);
logger.info("[x] Sent '" + msg + "' to queue [" + queueName + "] with delay " + dealy);
} catch (JmsException e) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment