{"id":477,"date":"2010-03-18T12:04:52","date_gmt":"2010-03-18T06:34:52","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=477"},"modified":"2010-06-09T15:34:58","modified_gmt":"2010-06-09T10:04:58","slug":"grails-jms-plugin-and-redelivery-policy","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/","title":{"rendered":"Grails JMS Plugin and Redelivery Policy"},"content":{"rendered":"<p>On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5<\/p>\n<p>Merely configuring ActiveMQ for setting up a Dead Letter Queue like :<\/p>\n<blockquote><p>&lt;policyEntry queue=&#8221;&gt;&#8221; memoryLimit=&#8221;5mb&#8221;&gt;<br \/>\n&lt;deadLetterStrategy&gt;<br \/>\n&lt;individualDeadLetterStrategy queuePrefix=&#8221;DLQ.&#8221; useQueueForQueueMessages=&#8221;true&#8221; \/&gt;<br \/>\n&lt;\/deadLetterStrategy&gt;<br \/>\n&lt;\/policyEntry&gt;<\/p><\/blockquote>\n<p>And injecting the bean redeliveryPolicy into jmsConnectionFactory bean inside resources.groovy like this:<\/p>\n<blockquote>\n<pre lang=\"groovy\">jmsRedeliveryPolicy(org.apache.activemq.RedeliveryPolicy){\r\n        maximumRedeliveries = 3\r\n        initialRedeliveryDelay = 500L\r\n        backOffMultiplier = 2\r\n        useExponentialBackOff = true\r\n    }\r\n    jmsConnectionFactory(org.apache.activemq.ActiveMQConnectionFactory) {\r\n        brokerURL = 'tcp:\/\/localhost:61616'\r\n        redeliveryPolicy = jmsRedeliveryPolicy\r\n    }\r\n<\/pre>\n<\/blockquote>\n<p>did not do the trick. When an exception was thrown in the listener method in any service exposed to JMS, the message was staying in the queue and halting processing of subsequent messages.<\/p>\n<p>A change in the configuration of the &#8220;standard&#8221; container was required and this was done in Config.groovy as :<\/p>\n<blockquote>\n<pre lang=\"groovy\">jms {\r\n    containers {\r\n        standard {\r\n            sessionTransacted = true\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<\/blockquote>\n<p>This did the trick and the redelivery policy and dead letter queue mechanism started working the way we wanted it to.<\/p>\n<p>Hope it helps<\/p>\n<p>Vivek<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5 Merely configuring [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":15,"footnotes":""},"categories":[7],"tags":[187,4840,186,190,188],"class_list":["post-477","post","type-post","status-publish","format-standard","hentry","category-grails","tag-activemq","tag-grails","tag-jms","tag-jms-plugin-0-5","tag-redelivery-policy"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5 Merely configuring\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Vivek Krishna\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Grails JMS Plugin and Redelivery Policy | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5 Merely configuring\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Grails JMS Plugin and Redelivery Policy | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5 Merely configuring\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-jms-plugin-and-redelivery-policy\\\/#article\",\"name\":\"Grails JMS Plugin and Redelivery Policy | TO THE NEW Blog\",\"headline\":\"Grails JMS Plugin and Redelivery Policy\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2010-03-18T12:04:52+05:30\",\"dateModified\":\"2010-06-09T15:34:58+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-jms-plugin-and-redelivery-policy\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-jms-plugin-and-redelivery-policy\\\/#webpage\"},\"articleSection\":\"Grails, activemq, Grails, jms, jms plugin 0.5, jms redelivery policy\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-jms-plugin-and-redelivery-policy\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-jms-plugin-and-redelivery-policy\\\/#listItem\",\"name\":\"Grails JMS Plugin and Redelivery Policy\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-jms-plugin-and-redelivery-policy\\\/#listItem\",\"position\":3,\"name\":\"Grails JMS Plugin and Redelivery Policy\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/\",\"name\":\"Vivek Krishna\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-jms-plugin-and-redelivery-policy\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/07dba643a97b00215bacf46343f18d6cb7ab45f777264e13c22deb54f2cc830b?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Vivek Krishna\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-jms-plugin-and-redelivery-policy\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-jms-plugin-and-redelivery-policy\\\/\",\"name\":\"Grails JMS Plugin and Redelivery Policy | TO THE NEW Blog\",\"description\":\"On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5 Merely configuring\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/grails-jms-plugin-and-redelivery-policy\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vivek\\\/#author\"},\"datePublished\":\"2010-03-18T12:04:52+05:30\",\"dateModified\":\"2010-06-09T15:34:58+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Grails JMS Plugin and Redelivery Policy | TO THE NEW Blog","description":"On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5 Merely configuring","canonical_url":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/#article","name":"Grails JMS Plugin and Redelivery Policy | TO THE NEW Blog","headline":"Grails JMS Plugin and Redelivery Policy","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/vivek\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2010-03-18T12:04:52+05:30","dateModified":"2010-06-09T15:34:58+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/#webpage"},"articleSection":"Grails, activemq, Grails, jms, jms plugin 0.5, jms redelivery policy"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/www.tothenew.com\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/#listItem","name":"Grails JMS Plugin and Redelivery Policy"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/#listItem","position":3,"name":"Grails JMS Plugin and Redelivery Policy","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/vivek\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/vivek\/","name":"Vivek Krishna","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/07dba643a97b00215bacf46343f18d6cb7ab45f777264e13c22deb54f2cc830b?s=96&d=mm&r=g","width":96,"height":96,"caption":"Vivek Krishna"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/","name":"Grails JMS Plugin and Redelivery Policy | TO THE NEW Blog","description":"On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5 Merely configuring","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/vivek\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/vivek\/#author"},"datePublished":"2010-03-18T12:04:52+05:30","dateModified":"2010-06-09T15:34:58+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Grails JMS Plugin and Redelivery Policy | TO THE NEW Blog","og:description":"On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5 Merely configuring","og:url":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Grails JMS Plugin and Redelivery Policy | TO THE NEW Blog","twitter:description":"On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5 Merely configuring","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"477","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 08:16:03","updated":"2024-02-29 11:01:21","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tGrails JMS Plugin and Redelivery Policy\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Grails","link":"https:\/\/www.tothenew.com\/blog\/category\/grails\/"},{"label":"Grails JMS Plugin and Redelivery Policy","link":"https:\/\/www.tothenew.com\/blog\/grails-jms-plugin-and-redelivery-policy\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=477"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/477\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}