Consumer not able to consume messages from queue

This is my configuration for Artemis embedded broker.

@Component
@EnableJms
public class ArtemisConfig {
    private static final String TOPIC_NAME = "myTopic";

    @Bean
    public static ConnectionFactory connectionFactory() {
        ActiveMQConnectionFactory connectionFactory =
            new ActiveMQConnectionFactory("tcp://localhost:61616");
        return new CachingConnectionFactory(connectionFactory);
    }

    @Bean
    public void activeMQServer() throws Exception {
        Configuration configuration = new ConfigurationImpl();
        configuration.setPersistenceEnabled(false);
        configuration.setSecurityEnabled(false);

        Map<String, Object> params = new HashMap<>();
        params.put("host", "localhost");
        params.put("port", 61616);
        params.put("Schema", "tcp");
        TransportConfiguration transportConfiguration =
            new TransportConfiguration(
                NettyAcceptorFactory.class.getName(), params);

        configuration.setAcceptorConfigurations(
            Collections.singleton(transportConfiguration));

        ActiveMQServer server =
            ActiveMQServers.newActiveMQServer(configuration);

        CoreAddressConfiguration coreAddressConfiguration =
            new CoreAddressConfiguration();
        coreAddressConfiguration.setName(TOPIC_NAME)
            .addRoutingType(RoutingType.MULTICAST);
        configuration.addAddressConfiguration(coreAddressConfiguration);

        QueueConfiguration queueConfiguration =
            new QueueConfiguration(TOPIC_NAME);
        queueConfiguration.setAddress(TOPIC_NAME);
        queueConfiguration.setName(TOPIC_NAME);
        queueConfiguration.setRoutingType(RoutingType.MULTICAST);
        queueConfiguration.setDurable(true);
        configuration.addQueueConfiguration(queueConfiguration);

        server.start();
    }

    @Bean(name = "jmsTemplate")
    public JmsTemplate jmsTemplate(ConnectionFactory connectionFactory) {
        JmsTemplate jmsTemplate = new JmsTemplate(connectionFactory);
        return jmsTemplate;
    }

    @Bean
    public JmsListenerContainerFactory<?> myFactory(
        ConnectionFactory connectionFactory,
        DefaultJmsListenerContainerFactoryConfigurer configurer) {
        DefaultJmsListenerContainerFactory factory =
            new DefaultJmsListenerContainerFactory();
        configurer.configure(factory, connectionFactory);
        factory.setPubSubDomain(true);
        factory.setConcurrency("1-4");
        return factory;
    }
}

This is my listener which consumes message from the queue

@Component
public class ArtemisListener {

  @JmsListener(destination = "myTopic", containerFactory = "myFactory")
  public void organizationCreated(Message message){
    System.out.println("Message received");
  }
}

I am running a test, In the logs, I can see that the queue is created and the message is sent to the specified address and the consumer is also created but the message is not consumed.

AMQ601065: User anonymous is creating a queue on target resource: ServerSessionImpl(jms-session=*N/A*) [with parameters: [QueueConfiguration [id=null, name=730d9da3-3d8c-4042-8ef8-c51788f646a5, address=myTopic, routingType=MULTICAST, filterString=null, durable=false, user=null, maxConsumers=-1, exclusive=null, groupRebalance=null, groupBuckets=null, groupFirstKey=null, lastValue=null, lastValueKey=null, nonDestructive=null, purgeOnNoConsumers=false, consumersBeforeDispatch=null, delayBeforeDispatch=null, consumerPriority=null, autoDelete=null, autoDeleteDelay=null, autoDeleteMessageCount=null, ringSize=null, configurationManaged=null, temporary=true, autoCreateAddress=null, internal=null, transient=null, autoCreated=false]]]


AMQ601265: User anonymous is creating a core consumer on target resource ServerSessionImpl(jms-session=*N/A*) [with parameters: [0, 730d9da3-3d8c-4042-8ef8-c51788f646a5, null, 0, false, true, null]]

AMQ601500: User anonymous is sending a core message on target resource: ServerSessionImpl(jms-session=*N/A*) [with parameters: [TransactionImpl [xid=null, txID=13, xid=null, state=ACTIVE, createTime=1721642690458(Mon Jul 22 10:04:50 UTC 2024), timeoutSeconds=300, nr operations = 0]@78c18d2c, CoreMessage[messageID=0,durable=true,userID=d57b5c8f-4811-11ef-b49b-8045dd328039,priority=4, timestamp=Mon Jul 22 10:04:50 UTC 2024,expiration=0, durable=true, address=myTopic,size=480,properties=TypedProperties[__AMQ_CID=d5352bca-4811-11ef-b49b-8045dd328039,_AMQ_ROUTING_TYPE=1]]@1550453457, true, false, RoutingContextImpl(Address=null, routingType=null, PreviousAddress=null previousRoute:null, reusable=null, version=0)

Any changes required in my config?
Thanks in advance!!

New contributor

John kid is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật