How setup JMS without Spring, I'using google Guice

I'm facing some problems trying to setup JMS without spring boot, before I was using Spring and everything was working fine, but now I won't use it anymore, I'm using Google Guice for some reasons.

I configured that Jms class config to inject the things that it requires

org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer;

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.jms.config.JmsListenerContainerFactory;

import org.springframework.jms.support.converter.MappingJackson2MessageConverter;

import org.springframework.jms.support.converter.MessageConverter;

import org.springframework.jms.support.converter.MessageType;

import org.springframework.util.ErrorHandler;

import org.springframework.util.backoff.FixedBackOff;

import javax.jms.ConnectionFactory;

@Configuration

@EnableJms

public class JmsConfig {

private static final String JMS_TYPE_ID_PROPERTY_NAME = "_type";

@Bean

public JmsListenerContainerFactory jmsQueueFactory(

ConnectionFactory connectionFactory,

DefaultJmsListenerContainerFactoryConfigurer configurer) {

log.info("JmsConfig.jmsQueueFactory - (TraceTest1)");

DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();

// This provides all Spring Boot's defaults to this factory, including message converter

configurer.configure(factory,...

Read More »

By: StackOverFlow - 5 days ago

Related Posts