Hi everyone,

Earlier today I created a new jira issue [1] on something that I consider
is a bug. It was triaged and marked as "Not a problem". I don't agree with
this so I'm starting this discussion either to better understand why it's
not a bug or to reopen it. I thought this mailing list was a better place
for discussion than the comment section of a jira issue.

Let me explain what I did, what happened and what I was expected and why I
was expecting this.

Basically I forced the shutdown of a context that was processing a message.
And by doing that I'm aware that I may lose some data, and it's my expected
behavior.

In the console, after the shutdown you can see that the DefaultTypeConverter
is starting up and then an java.util.concurrent.RejectedExecutionException
is thrown.
But since the context is stopped, I don't want:
* the TypeConverter to start, it has no meaning since I don't want to
process any message and as far I can tell it's not cleared afterwards.
* an exception telling me that it cannot process the message, since it's
what I wanted I shouldn't have any exception.

In more real-world use-case (not this bug simple reproduction use case), I
noticed that after a force shutdown the context was still manipulating data
which I didn't want before crashing

In my opinion, if the context is stopping it should try to finish the
in-processing messages. But if the context is stopped, it shouldn't try at
all to continue.

It may not be easy to stop the processing especially when it's asynchronous
but camel should try to do so. Camel should not even try to go to the next
processor and it shouldn't throw any exception when it cannot go to the
next processor.

But maybe I don't quite understand the force shutdown feature and this is
not a bug. Can you give me your insights on this matter ?

Thanks a lot,

Antoine.

[1] https://issues.apache.org/jira/browse/CAMEL-6685

Reply via email to