0
votes

I want to send the messages received from a jms queue to a spring pub sub channel in order to forward the same message to two destinations. The poller was working fine for a direct channel but is dropping messages when posting to pub sub channel. Please let me know what I am missing.

<int-jms:inbound-channel-adapter connection-factory="connectionFactory" destination-name="queue-name" channel="jmsChannel" extract-payload="false" acknowledge="transacted">
        <int:poller max-messages-per-poll="5" fixed-delay="1000"></int:poller>
                </int-jms:inbound-channel-adapter>

<int:publish-subscribe-channel id="jmsChannel" task-executor="executor" />              
        
    <task:executor id="executor" pool-size="10"/>
    
<int-jms:outbound-channel-adapter  connection-factory="connectionFactory" channel="jmsChannel"  destination-name="sample-q" />
1

1 Answers

0
votes

The default behavior of a pub/sub channel is similar to a JMS topic with no durable subscriptions; if there are no subscribers, the message is dropped.