Hi Team,
i am new to solace system, as part of project requirement i want to migrate from javax.jms.ConnectionFactory to jakarta.jms.ConnectionFactory it means Springboot 2 to Springboot3. while searching in community forums found this url suits to me.
https://github.com/SolaceProducts/solace-spring-boot/tree/master/solace-spring-boot-samples/solace-jms-sample-app
could anyone please help me how to run the above git project to test locally.
Here i require two things help.
- while running application getting below error
Parameter 0 of method cFactory in com.example.demo.ConsumerConfiguration required a bean of type ‘jakarta.jms.ConnectionFactory’ that could not be found.
package com.example.demo;
import java.util.Iterator;
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.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
@SpringBootApplication
public class DemoApplication {
}
package com.example.demo;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import jakarta.jms.ConnectionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.jms.config.DefaultJmsListenerContainerFactory;
import org.springframework.stereotype.Service;
import org.springframework.util.ErrorHandler;
@EnableJms
@Configuration
public class ConsumerConfiguration {
}
- Using this below properties in application.properties but i could not able to test publisher and consumer messages.
solace.jms.host=tcp://192.168.133.64:55555
solace.jms.msgVpn=default
solace.jms.clientUsername=default
solace.jms.clientPassword=default
solace.jms.apiProperties.Solace_JMS_DynamicDurables=true
solace.jms.demoQueueName=tutorial/queue
logging.level.com.solacesystems=INFO