I am in the process of evaluating Solace as an alternative to Kafka. Reason for this is that Kafka does not support XA transactions and in some scenarios we lost messages.
I installed downloaded and managed to successfully start Solace message broker locally in aa docker container. One of our applications successfully produces messages to a Solace queue while another one is successfully consuming it so so far so good.
However on the consumer part I can see this entry popping up in our logs every few milliseconds making the logs unreadable.
c.s.jcsmp.impl.SessionModeSupport : (Client name: C02XN27DJG5H/18407/013b0001/qdYUqogzhc Local addr: 127.0.0.1 Local port: 51923 Remote addr: localhost Remote port: 55555) - Error Response (400) - Already Exists
I can silence the entry from log4j configuration but I am sure this is not the way to go. I am quite sure somewhere something is not configured properly. Here is my spring boot beans configuration:
` @Bean(“solaceTemplate”)
public JmsTemplate jmsTemplate() throws Exception {
return new JmsTemplate(solaceCachingConnectionFactory());
}
@Bean("solaceCachingConnectionFactory")
public ConnectionFactory solaceCachingConnectionFactory() throws Exception {
var cachingConnectionFactory = new CachingConnectionFactory();
cachingConnectionFactory.setTargetConnectionFactory(solaceConnectionFactory());
cachingConnectionFactory.setReconnectOnException(true);
cachingConnectionFactory.setSessionCacheSize(500);
cachingConnectionFactory.setExceptionListener(e -> log.error("ErrorResponse making connection with MQ", e));
return cachingConnectionFactory;
}
@Bean("solaceConnectionFactory")
public ConnectionFactory solaceConnectionFactory() throws Exception {
var connectionFactory = SolJmsUtility.createConnectionFactory();
connectionFactory.setHost("localhost:55555");
connectionFactory.setVPN("default");
connectionFactory.setUsername("admin");
connectionFactory.setPassword("admin");
// Enables persistent queues or topic endpoints to be created dynamically
// on the router, used when Session.createQueue() is called below
connectionFactory.setDynamicDurables(true);
return connectionFactory;
}`
So what I am doing. wrong and how should I fix the issue. I am very new to Solace so please be patient with me. Thank you in advance for your help.
Julian