Really thanks for your answer ! ML
De : Lehel Boér <lehe...@hotmail.com> Date : mardi, 13 février 2024 à 15:18 À : dev@nifi.apache.org <dev@nifi.apache.org> Objet : Re: Streaming processor / primary node only Hi, The @OnPrimaryNodeStateChange annotation can be utilized to manage the behavior of processors based on changes in the primary node status. This annotation allows you to define actions to be taken when the primary node changes, such as starting Hi, The @OnPrimaryNodeStateChange annotation can be utilized to manage the behavior of processors based on changes in the primary node status. This annotation allows you to define actions to be taken when the primary node changes, such as starting or stopping message consumption. I recommend checking the GetAzureEventHub processor, as it likely implements similar functionality with regards to handling primary node changes. Best Regards, Lehel Interne ________________________________ From: LEZIER Maxime (ITNOVEM) <m.lez...@sncf.fr> Sent: Tuesday, February 13, 2024 6:33 To: dev@nifi.apache.org <dev@nifi.apache.org> Subject: Streaming processor / primary node only Hello, I have to dev a streaming processor to consume stomp messages. The code make the job but I have a problem with de primary node change. By default, the processor is configured on primary node only to handle duplicate message. What I find is that when there's a change of primary node, the consumer on the previous primary continues to work, so I end up with duplicates. the processor on the previous primary should stop when a switch is made. I've found the "@OnPrimaryNodeStateChange" annotation, but I'm not sure how to use it. Do you have any examples of processors that use it to switch message consumption from one primary to another? Thanks for your help. ML Interne ------- Ce message et toutes les pièces jointes sont établis à l'intention exclusive de ses destinataires et sont confidentiels. L'intégrité de ce message n'étant pas assurée sur Internet, la SNCF ne peut être tenue responsable des altérations qui pourraient se produire sur son contenu. Toute publication, utilisation, reproduction, ou diffusion, même partielle, non autorisée préalablement par la SNCF, est strictement interdite. Si vous n'êtes pas le destinataire de ce message, merci d'en avertir immédiatement l'expéditeur et de le détruire. ------- This message and any attachments are intended solely for the addressees and are confidential. SNCF may not be held responsible for their contents whose accuracy and completeness cannot be guaranteed over the Internet. Unauthorized use, disclosure, distribution, copying, or any part thereof is strictly prohibited. If you are not the intended recipient of this message, please notify the sender immediately and delete it.