For My Application(Spring boot + ActiveMq), if i consume jms messages inside application its consumes only one time when it comes to another application to this application it consumes 7 times, when look into logs stating that redelivercount has increases one by one and upto 7 times.
Is this configuration issue or someother?
12 Jan 2017 20:34:14,473 [7553] [DefaultMessageListenerContainer-1] INFO com.xerago.rsa.jms.Consumer 21 {} - ActiveMQMapMessage ::: ActiveMQMapMessage {commandId = 5, responseRequired = true, messageId = ID:DWTECH031-44805-1484233018540-1:2:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DWTECH031-44805-1484233018540-1:2:1:1, destination = queue://soapCall, transactionId = null, expiration = 0, timestamp = 1484233454452, arrival = 0, brokerInTime = 1484233454452, brokerOutTime = 1484233454453, correlationId = Hai, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@6ef648b, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false} ActiveMQMapMessage{ theTable = {QuoteId=FHM166963} }
12 Jan 2017 20:34:15,624 [7553] [DefaultMessageListenerContainer-1] INFO com.xerago.rsa.jms.Consumer 21 {} - ActiveMQMapMessage ::: ActiveMQMapMessage {commandId = 5, responseRequired = true, messageId = ID:DWTECH031-44805-1484233018540-1:2:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DWTECH031-44805-1484233018540-1:2:1:1, destination = queue://soapCall, transactionId = null, expiration = 0, timestamp = 1484233454452, arrival = 0, brokerInTime = 1484233454452, brokerOutTime = 1484233454453, correlationId = Hai, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@6ef648b, marshalledProperties = null, dataStructure = null, redeliveryCounter = 1, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false} ActiveMQMapMessage{ theTable = {QuoteId=FHM166963} }
12 Jan 2017 20:34:16,667 [7553] [DefaultMessageListenerContainer-1] INFO com.xerago.rsa.jms.Consumer 21 {} - ActiveMQMapMessage ::: ActiveMQMapMessage {commandId = 5, responseRequired = true, messageId = ID:DWTECH031-44805-1484233018540-1:2:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DWTECH031-44805-1484233018540-1:2:1:1, destination = queue://soapCall, transactionId = null, expiration = 0, timestamp = 1484233454452, arrival = 0, brokerInTime = 1484233454452, brokerOutTime = 1484233454453, correlationId = Hai, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@6ef648b, marshalledProperties = null, dataStructure = null, redeliveryCounter = 2, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false} ActiveMQMapMessage{ theTable = {QuoteId=FHM166963} }
12 Jan 2017 20:34:17,725 [7553] [DefaultMessageListenerContainer-1] INFO com.xerago.rsa.jms.Consumer 21 {} - ActiveMQMapMessage ::: ActiveMQMapMessage {commandId = 5, responseRequired = true, messageId = ID:DWTECH031-44805-1484233018540-1:2:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DWTECH031-44805-1484233018540-1:2:1:1, destination = queue://soapCall, transactionId = null, expiration = 0, timestamp = 1484233454452, arrival = 0, brokerInTime = 1484233454452, brokerOutTime = 1484233454453, correlationId = Hai, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@6ef648b, marshalledProperties = null, dataStructure = null, redeliveryCounter = 3, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false} ActiveMQMapMessage{ theTable = {QuoteId=FHM166963} }
12 Jan 2017 20:34:18,884 [7553] [DefaultMessageListenerContainer-1] INFO com.xerago.rsa.jms.Consumer 21 {} - ActiveMQMapMessage ::: ActiveMQMapMessage {commandId = 5, responseRequired = true, messageId = ID:DWTECH031-44805-1484233018540-1:2:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DWTECH031-44805-1484233018540-1:2:1:1, destination = queue://soapCall, transactionId = null, expiration = 0, timestamp = 1484233454452, arrival = 0, brokerInTime = 1484233454452, brokerOutTime = 1484233454453, correlationId = Hai, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@6ef648b, marshalledProperties = null, dataStructure = null, redeliveryCounter = 4, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false} ActiveMQMapMessage{ theTable = {QuoteId=FHM166963} }
12 Jan 2017 20:34:19,934 [7553] [DefaultMessageListenerContainer-1] INFO com.xerago.rsa.jms.Consumer 21 {} - ActiveMQMapMessage ::: ActiveMQMapMessage {commandId = 5, responseRequired = true, messageId = ID:DWTECH031-44805-1484233018540-1:2:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DWTECH031-44805-1484233018540-1:2:1:1, destination = queue://soapCall, transactionId = null, expiration = 0, timestamp = 1484233454452, arrival = 0, brokerInTime = 1484233454452, brokerOutTime = 1484233454453, correlationId = Hai, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@6ef648b, marshalledProperties = null, dataStructure = null, redeliveryCounter = 5, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false} ActiveMQMapMessage{ theTable = {QuoteId=FHM166963} }
12 Jan 2017 20:34:20,976 [7553] [DefaultMessageListenerContainer-1] INFO com.xerago.rsa.jms.Consumer 21 {} - ActiveMQMapMessage ::: ActiveMQMapMessage {commandId = 5, responseRequired = true, messageId = ID:DWTECH031-44805-1484233018540-1:2:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DWTECH031-44805-1484233018540-1:2:1:1, destination = queue://soapCall, transactionId = null, expiration = 0, timestamp = 1484233454452, arrival = 0, brokerInTime = 1484233454452, brokerOutTime = 1484233454453, correlationId = Hai, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@6ef648b, marshalledProperties = null, dataStructure = null, redeliveryCounter = 6, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false} ActiveMQMapMessage{ theTable = {QuoteId=FHM166963} }
@Component
public class Consumer {
@JmsListener(destination = "soapCall")
public String receiveQueue(ActiveMQMapMessage activeMQMapMessage) throws Exception {
try {
LOGGER.info("ActiveMQMapMessage ::: " + activeMQMapMessage);
LOGGER.info("activeMQMapMessage.getJMSCorrelationID() :: " + activeMQMapMessage.getJMSCorrelationID());
LOGGER.info("activeMQMapMessage.getContentMap() :: " + activeMQMapMessage.getContentMap());
String Id = activeMQMapMessage.getString("Id");
return Id;
} catch (Exception e) {
LOGGER.info(e.getMessage(), e);
throw e;
}
}
}
Producer.java
@Component
public class MakeEcall {
private static final Logger LOGGER = LogManager.getRootLogger();
@Autowired
JmsTemplate jmsTemplate;
public void send(ActiveMQMapMessage activeMQMapMessage) throws Exception {
this.jmsTemplate.convertAndSend("soapCall", activeMQMapMessage );
LOGGER.info("Call triggered Successfully.... Posted into JMSQueue for this " + activeMQMapMessage.getString("Id"));
}
}