Skip to content

Split DefaultExceptionHandler into strict and forgiving versions #74

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

Merged
merged 3 commits into from
Jul 3, 2015

Conversation

michaelklishin
Copy link
Contributor

Fixes #68.

Currently DefaultExceptionHandler will close the channel
when an unhandled consumer or listener exception occurs.
Not everybody agrees this is a great idea. This commit introduces
a forgiving version and keeps DefaultExceptionHandler strict.

For 3.6.0 we will make DefaultExceptionHandler forgiving.
@michaelklishin michaelklishin self-assigned this Jul 3, 2015
@michaelklishin michaelklishin added this to the n/a milestone Jul 3, 2015
michaelklishin added a commit that referenced this pull request Jul 3, 2015
Split DefaultExceptionHandler into strict and forgiving versions
@michaelklishin michaelklishin merged commit 8baaf64 into stable Jul 3, 2015
JavierCane added a commit to CodelyTV/scala-ddd-example that referenced this pull request Jan 10, 2018
* Purge the queue before performing the test in order to avoid consuming previously published events such as the ones coming from the acceptance tests.
* Since the `MessagePublisher` publishes out the messages asynchronously, we were validating that the queue was empty even before publishing the message, so we were not really waiting for the message to be consumed before asserting that the consumed message was the expected one. Now we wait until the queue has messages before starting to consume.
* The previous assertion was running in another thread and, since the default exception handler used by the RabbitMQ library is an implementation which catches the exceptions and traduce them into a log error (rabbitmq/rabbitmq-java-client#74), the test was never failing (only logging errors). Now we inject from the test to the messages consumer a handler which extracts the event into a synchronized `mutable.Buffer` in order to perform the assertions proving that the consumed messages are the ones we're really expecting. Since that assertion is performed outside the consumer, the test will fail in case the expected messages doesn't match the consumed ones.
JavierCane added a commit to CodelyTV/scala-ddd-example that referenced this pull request Jan 10, 2018
* Purge the queue before performing the test in order to avoid consuming previously published events such as the ones coming from the acceptance tests.
* Since the `MessagePublisher` publishes out the messages asynchronously, we were validating that the queue was empty even before publishing the message, so we were not really waiting for the message to be consumed before asserting that the consumed message was the expected one. Now we wait until the queue has messages before starting to consume.
* The previous assertion was running in another thread and, since the default exception handler used by the RabbitMQ library is an implementation which catches the exceptions and traduce them into a log error (rabbitmq/rabbitmq-java-client#74), the test was never failing (only logging errors). Now we inject from the test to the messages consumer a handler which extracts the event into a synchronized `mutable.Buffer` in order to perform the assertions proving that the consumed messages are the ones we're really expecting. Since that assertion is performed outside the consumer, the test will fail in case the expected messages doesn't match the consumed ones.
JavierCane added a commit to CodelyTV/scala-ddd-example that referenced this pull request Jan 11, 2018
* Purge the queue before performing the test in order to avoid consuming previously published events such as the ones coming from the acceptance tests.
* Since the `MessagePublisher` publishes out the messages asynchronously, we were validating that the queue was empty even before publishing the message, so we were not really waiting for the message to be consumed before asserting that the consumed message was the expected one. Now we wait until the queue has messages before starting to consume.
* The previous assertion was running in another thread and, since the default exception handler used by the RabbitMQ library is an implementation which catches the exceptions and traduce them into a log error (rabbitmq/rabbitmq-java-client#74), the test was never failing (only logging errors). Now we inject from the test to the messages consumer a handler which extracts the event into a synchronized `mutable.Buffer` in order to perform the assertions proving that the consumed messages are the ones we're really expecting. Since that assertion is performed outside the consumer, the test will fail in case the expected messages doesn't match the consumed ones.
@acogoluegnes acogoluegnes deleted the rabbitmq-java-client-68 branch March 21, 2019 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant