-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experimental: allow custom prefetch_count on trigger policies #749
base: release-1.1
Are you sure you want to change the base?
Experimental: allow custom prefetch_count on trigger policies #749
Conversation
Based on astarte-platform/astarte_core#83. |
2440650
to
8957d98
Compare
8957d98
to
33089f0
Compare
Codecov Report
@@ Coverage Diff @@
## release-1.1 #749 +/- ##
===============================================
+ Coverage 68.43% 68.75% +0.32%
===============================================
Files 258 259 +1
Lines 5911 5924 +13
===============================================
+ Hits 4045 4073 +28
+ Misses 1866 1851 -15
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
33089f0
to
917b3ed
Compare
When using Trigger Delivery Policies, ordered event delivery is not guaranteed because messages might not be dequeued (thus processed) sequentially. As a possible solution, allow the policy to specify the AMQP consumer prefetch count used for its event queue. If the value is 1, an instance of Trigger Engine processes events sequentially. This is an experimental feature and thus disabled by default. You can enable it with the `REALM_MANAGEMENT_ALLOW_TRIGGER_POLICY_PREFETCH_COUNT` env var. Signed-off-by: Arnaldo Cesco <[email protected]>
Signed-off-by: Arnaldo Cesco <[email protected]>
Until now, a trigger policy used a consumer prefetch set by the `TRIGGER_ENGINE_AMQP_CONSUMER_PREFETCH_COUNT` env (as usual in Astarte). If the policy provides a custom consumer prefetch count (e.g. for message ordering reasons), use that prefetch value. This can be done if the related Realm Management flag is enabled. The default policy will still respect the default prefetch count, so as not to break compatibility with previous Astarte versions. Signed-off-by: Arnaldo Cesco <[email protected]>
917b3ed
to
47cb1ac
Compare
Signed-off-by: Arnaldo Cesco <[email protected]>
47cb1ac
to
6d7ab9d
Compare
When using Trigger Delivery Policies, ordered event delivery is not guaranteed because messages might not be dequeued (thus processed) sequentially. Allow the policy to specify the AMQP consumer prefetch count used for its event queue. If the value is 1, the Trigger Engine instance processes events sequentially.
This is an experimental feature and thus disabled by default. You can enable it with the REALM_MANAGEMENT_ALLOW_AMQP_CONSUMER_PREFETCH_COUNT env var. Note that, even if the flag is enabled, the default policy will still respect the default prefetch count, so as not to break compatibility with previous Astarte versions.