logo
down
shadow

Spring-integration: Put message into JMS queue only if e-mails has been sent


Spring-integration: Put message into JMS queue only if e-mails has been sent

By : user2949988
Date : November 17 2020, 04:28 AM
will be helpful for those in need
OBS: By now a am using publish-subscribe-channel, but this is not exactly what i need.
code :


Share : facebook icon twitter icon
Sending spring integration jms message to specific queue (dynamically)

Sending spring integration jms message to specific queue (dynamically)


By : user3386506
Date : March 29 2020, 07:55 AM
will help you The can be configured not only to the static destination, but with some dynamic behavior to determine destination at runtime using SpEL against request message.
code :
destination-expression="headers.destination"
@Publisher(channel="annotationConfigRegistrationTest")
@Payload("#return + #args.lname")
public String setName(String fname, String lname, @Header("x") int num) {
    return fname + " " + lname;
}
Spring Integration - Can a message store be persistent to a queue?

Spring Integration - Can a message store be persistent to a queue?


By : NoobMaster
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , Question: How to roll back messages in a Message Store back to a queue if a system failure occurs? , It's not clear what you mean by...
Spring JMS Integration Unit Test leaves message on queue

Spring JMS Integration Unit Test leaves message on queue


By : Pralobh Mangnalikar
Date : March 29 2020, 07:55 AM
wish of those help You need to set sessionTransacted on the JmsTemplate to true.
But, bear in mind that you won't be able to receive the test message anyplace, unless you commit it.
spring integration with jms, weblogic, message appears in queue even after message is consumed into channel

spring integration with jms, weblogic, message appears in queue even after message is consumed into channel


By : MrConfetti
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further I think you should distinguish the consuming part from producing to the separate threads. I don't tell that you have to switch to the transactions, but at least the simple acknowledge for the consumed message should be done.
Since you tell that you are going to putt the message back to the queue, that's definitely the fact to always acknowledge the consumed message independently of the error fact. So, what I suggest is something like to place a QueueChannel or an ExecutorChannel somewhere after and before to let them do their hard work with the WebLogic JMS in their own threads.
How to implement message queue with Spring Integration and MongoDB?

How to implement message queue with Spring Integration and MongoDB?


By : Jason R. Mick
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further That's correct. To achieve such a requirement you need to take a look into the:
code :
/**
 * Specify the {@link TransactionSynchronizationFactory} to attach a
 * {@link org.springframework.transaction.support.TransactionSynchronization}
 * to the transaction around {@code poll} operation.
 * @param transactionSynchronizationFactory the TransactionSynchronizationFactory to use.
 * @return the spec.
 */
public PollerSpec transactionSynchronizationFactory(
        TransactionSynchronizationFactory transactionSynchronizationFactory) {
<int-mongodb:inbound-channel-adapter id="inboundAdapterWithOnSuccessDisposition"
                                     channel="replyChannel"
                                     query="{'name' : 'Bob'}"
                                     auto-startup="false">

    <int:poller fixed-delay="200" max-messages-per-poll="1">
        <int:advice-chain  synchronization-factory="syncFactory">
            <bean
                    class="org.springframework.integration.mongodb.config.MongoDbInboundChannelAdapterIntegrationTests.TestMessageSourceAdvice" />
            <tx:advice>
                <tx:attributes>
                    <tx:method name="*" />
                </tx:attributes>
            </tx:advice>
        </int:advice-chain>
    </int:poller>
</int-mongodb:inbound-channel-adapter>

<int:transaction-synchronization-factory id="syncFactory">
    <int:before-commit expression="@documentCleaner.remove(#mongoTemplate, payload, headers.mongo_collectionName)"/>
</int:transaction-synchronization-factory>

<bean id="transactionManager" class="org.springframework.integration.transaction.PseudoTransactionManager" />
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org