I’m working on spring boot with tibco ems project.
Required to create producer nd consumer configurations. Could any one guide with configurations
I’m working on spring boot with tibco ems project.
Required to create producer nd consumer configurations. Could any one guide with configurations
Import tibjms.jar library, then:
import com.tibco.tibjms.TibjmsConnectionFactory;
and create the following beans:
@Bean
public TibjmsConnectionFactory connectionFactory() {
TibjmsConnectionFactory connectionFactory = new TibjmsConnectionFactory("tcp://localhost:7222");
return connectionFactory;
}
@Bean
public JmsTemplate JmsTemplate() {
JmsTemplate jmsTemplate =
new JmsTemplate(connectionFactory());
return jmsTemplate;
}
The receiver will be:
@Component
public class Receiver {
@JmsListener(destination = "test_queue")
public void receiveMessage(String message) {
System.out.println("Received <" + message + ">");
}
}
and the sender will be:
JmsTemplate jmsTemplate = context.getBean(JmsTemplate.class);
jmsTemplate.convertAndSend("test_queue", "Hello");