onebeyond/rascal

Issue with redevelieries, counters as unsupported attribute

dougg0k opened this issue · 1 comments

I was not sure if the issue was with the library or with rascal, if the issue is not with rascal itself, it can be closed.

cressie176/rascal-redis-counter#11

I got the same error with deferred_retry in recovery object.

recovery: {
	deferred_retry: [
		{
			strategy: "forward",
			attempts: 5,
			publication: MESSAGE_BROKER.publications.RETRY,
			xDeathFix: true,
		},
		{
			strategy: "nack",
		},
	],
	dead_letter: [
		{
			strategy: "republish",
			immediateNack: true,
		},
	],
},
err: {
      "type": "Error",
      "message": "Vhost: recovery refers to an unsupported attribute: deferred_retry",
      "stack":
          Error: Vhost: recovery refers to an unsupported attribute: deferred_retry
              at validateAttributes (/app/node_modules/rascal/lib/config/validate.js:34:31)
              at validateVhost (/app/node_modules/rascal/lib/config/validate.js:22:5)
              at /app/node_modules/lodash/lodash.js:4967:15
              at baseForOwn (/app/node_modules/lodash/lodash.js:3032:24)
              at /app/node_modules/lodash/lodash.js:4936:18
              at Function.forEach (/app/node_modules/lodash/lodash.js:9410:14)
              at validateVhosts (/app/node_modules/rascal/lib/config/validate.js:18:7)
              at /app/node_modules/rascal/lib/config/validate.js:7:5
              at apply (/app/node_modules/lodash/lodash.js:489:27)
              at wrapper (/app/node_modules/lodash/lodash.js:5101:16)
              at /app/node_modules/async/dist/async.js:1984:20
              at /app/node_modules/async/dist/async.js:1925:13
              at replenish (/app/node_modules/async/dist/async.js:443:21)
              at /app/node_modules/async/dist/async.js:448:13
              at eachOfLimit$1 (/app/node_modules/async/dist/async.js:474:34)
              at awaitable (/app/node_modules/async/dist/async.js:211:32)
    }

On a related note, providing you are using quite a recently version of RabbitMQ in a High Availability config and haven't already created the queues, you could use a quorem queue. These can be configured to automatically nack repeated redeliveries without using Rascal or an external redelivery counter.