Chirag, In certain circumstances, yes it can produce duplicate messages.
Regards, William Crowell From: Chirag <chirag.sangh...@gmail.com> Date: Wednesday, April 2, 2025 at 11:06 AM To: users@camel.apache.org <users@camel.apache.org> Subject: Re: Checking For Duplicate Message IDs Using Cassandra Idempotent Repository [You don't often get email from chirag.sangh...@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] is ActiveMQ known to do message duplications? Regards, Chirag On Wed, Apr 2, 2025 at 9:04 AM William Crowell <wcrow...@perforce.com.invalid> wrote: > Hi, > > I am trying to transfer messages from an ActiveMQ Classic queue to IBM MQ, > and I want to make sure messages are not processed twice. I would like to > use the Cassandra Idempotent Repository: > > > https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcamel.apache.org%2Fcomponents%2F4.10.x%2Fcql-component.html%23_idempotent_repository&data=05%7C02%7CWCrowell%40perforce.com%7Cc02adc78d9bf48e27a4708dd71f7e01d%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638792031646459651%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=j%2B2LohxymYGskiMwAS1HsAbrocvnUEDTlqbUosPU54c%3D&reserved=0<https://camel.apache.org/components/4.10.x/cql-component.html#_idempotent_repository> > > Are there any good examples on how to accomplish this? So far, I have > this, but I am missing how to connect to the Cassandra database. I am > guessing this would be for an in-memory only Cassandra database? > > … > <bean id="repo” > class="org.apache.camel.support.processor.idempotent.MemoryIdempotentRepository"/> > > <camelContext > id="camel" > xmlns="https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fspring&data=05%7C02%7CWCrowell%40perforce.com%7Cc02adc78d9bf48e27a4708dd71f7e01d%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638792031646481323%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=H3jho1ma3KmL3CsrUd2E%2BH3ILcgpxyTDKQ4kdBR5Igw%3D&reserved=0<http://camel.apache.org/schema/spring>" > streamCache="true"> > <route id="MY.ROUTE”> > <from uri="jms: > queue://SOURCE.QUEUE?cacheLevelName=CACHE_CONSUMER& > concurrentConsumers=2&maxConcurrentConsumers=4&maxMessagesPerTask=100& > transacted=falsesamp; > lazyCreateTransactionManager=false&acknowledgementModeName=CLIENT_ACKNOWLEDGE&connectionFactory=#activemq"/> > > <idempotentConsumer messageIdRepositoryRef=“repo”> > <simple>header.TransactionID</simple> > ‹onException> > <exception>java.io. IOException</exception> > > <exception>org.springframework.jms.IllegalStateException</exception> > <exception>com.ibm.mg.MQException</exception> > ‹handled> > ‹constant>true</constant> > </handled> > <to uri="jms: queue: //DEST.QUEUE” > disableReplyIo=truesamp;deliveryPersistent=false&acknowledgementModeName=CLIENT_ACKNOWLEDGE&connectionFactory=#activemg > </onException> > ... > > Regards, > > William Crowell > > > This e-mail may contain information that is privileged or confidential. If > you are not the intended recipient, please delete the e-mail and any > attachments and notify us immediately. > > CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe. This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.