-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement reconnect logic for AMQP EventReader
Implemented functionality that handles reconnecting to the amqp server and reinitializing the amqp channel in case of errors and timeouts. This is handled by a goroutine created in the client constructor (it also handles the initial connect/init). Reconnects and reinits will use a fibonacci backoff strategy, and the attempt amount and max waiting interval can be adjusted by the 'reconnects' and 'max_reconnect_interval' config options. Messages that fail processing are now dropped instead of being requeued, preventing infinite processing loops. However, this means that the messages are lost. Handling failed messages will need to be addressed separately. 'concurrent_requests' will now set the prefetch count. Setting the prefetch count using the Qos function was able to replace our old approach that was using channels. Default value is 1024 which, according to the rabbitmq docs, 'runs into the law of diminishing returns'. The recommended value is between 100-300. Source: https://www.rabbitmq.com/confirms.html#channel-qos-prefetch-throughput Fix test compilation errors and failing tests caused by these changes. References #4160
- Loading branch information
1 parent
f696164
commit c282d40
Showing
9 changed files
with
803 additions
and
594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.