wso2 / andes

Apache License 2.0
39 stars 128 forks source link

Fix NPE when subscriber closed and Thrift server thread hang and Thrift server hangs in socket read #948

Closed wggihan closed 6 years ago

wggihan commented 6 years ago

Purpose

To fix https://github.com/wso2/product-ei/issues/1619 and https://github.com/wso2/product-ei/issues/1613.

Goals

Fixes the NPE that occurs when a subscription connection is abruptly removed. The issue was caused by a message duplication. Messages that are failed during delivery were requeued where all the messages that are bound to the subscription are also requeued from another path. As the resolution, avoided requeueing messages when the delivery is failed due to the subscriber being not available.

This fix provided by @sdkottegoda .

sdkottegoda commented 6 years ago

The 2 commits fix the 2 issues separetely. Shall we correct the commit messages accordingly?