Thanks! -----Original Message----- From: Justin Bertram <jbert...@apache.org> Sent: Sunday, December 1, 2024 9:50 PM To: users@activemq.apache.org Subject: Re: Recommended shutdown pattern for Artemis clients
*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. *** Your application is really in control of shutting itself down gracefully. The main thing to do is to invoke stop() [1] on the Connection. That will halt delivery of any further messages to your consumers. Perhaps this is the magic method you were looking for. Any active consumers can complete their processing and send their replies and then the application can shut down. You may be interested in ARTEMIS-5093 [2] as it is relevant for the stopping case as well as the closing case. Justin [1] https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.oracle.com_javaee_7_api_javax_jms_Connection.html-23stop-2D-2D&d=DwIFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=VpU5fPwEQ8wKbKY5SBkV1DYypS_WKWolD9Eue6u6sYo&m=VpfRkFXg5grFIKjKBeMrx4Ax45nfZf71YGiha5wuSrUoCHDtQ7cJwMNe53Hgsmwk&s=VbQPFMG6-Iy6KQL0zx3PWgsq9ETvESCziQPWSCeC-XM&e= [2] https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_ARTEMIS-2D5093&d=DwIFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=VpU5fPwEQ8wKbKY5SBkV1DYypS_WKWolD9Eue6u6sYo&m=VpfRkFXg5grFIKjKBeMrx4Ax45nfZf71YGiha5wuSrUoCHDtQ7cJwMNe53Hgsmwk&s=76BldFcRem9D1k4YWcVF496iTPLnrAuWGBSLyTepEaU&e= On Sat, Nov 30, 2024 at 2:51 PM John Lilley <https://urldefense.proofpoint.com/v2/url?u=http-3A__john.lilley-40redpointglobal.com&d=DwIFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=VpU5fPwEQ8wKbKY5SBkV1DYypS_WKWolD9Eue6u6sYo&m=VpfRkFXg5grFIKjKBeMrx4Ax45nfZf71YGiha5wuSrUoCHDtQ7cJwMNe53Hgsmwk&s=cWJ7zJ_q5PZHySmOF9KnADtebg1l-8mExY06hI1rXnI&e=> wrote: > Our software mostly consists of RPC services which receive requests on > a named queue and post replies to the reply-to queue of the message. > We are using the JMS Artemis driver version 2.32.0. > > There are times when we want a service to shutdown gracefully, meaning > > * Stops receiving new requests > * Finishes processing in-flight requests and posts responses to > reply-to queues (and ACKs messages) > * Quits the service > > What is the correct sequence to do this? IIRC we can't just stop a > Consumer when it might be processing a request or we get errors. I'm > hoping there is some kind of suspend() or shutdown() call that still > allows in-flight requests to complete. > > Thanks > John > > PLEASE NOTE: This e-mail from Redpoint Global Inc. ("Redpoint") is > confidential and is intended solely for the use of the individual(s) > to whom it is addressed. If you believe you received this e-mail in > error, please notify the sender immediately, delete the e-mail from > your computer and do not copy, print or disclose it to anyone else. If > you properly received this e-mail as a customer, partner or vendor of > Redpoint, you should maintain its contents in confidence subject to > the terms and conditions of your agreement(s) with Redpoint. > ---------- This email has been scanned for spam and viruses by Proofpoint Essentials. Visit the following link to report this email as spam: https://us5.proofpointessentials.com/app/report_spam.php?mod_id=11&mod_option=logitem&report=1&type=easyspam&k=k1&payload=53616c7465645f5f38f53a0bd073c45a170740c38ecda6c8774f28ad98208eb7beb13e70a417363889365bd5bb08cd3af8bef84555553128ab60410709eec05f4ee8a6c5b0dd2b3a20796886034575be4cd5ac7e5c56668a65a5b9403064893b4b37b6f40500a05e6f9aadce8fd93f061abf339b816861bd517c3b2ec97f2d4b82b067dfe9ddb8514defb2efb110564387e65bf19f2b1d5fb3783ce2141437f8 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@activemq.apache.org For additional commands, e-mail: users-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact