On Thu, 22 Sep 2011 08:02:47 +0700, Ivan Pechorin
<ivan.pecho...@gmail.com> wrote:

>>>> The reason is that the ActiveMQConsumer object is crashing during its
>>>> destruction.
>>>>
>>>Stack traces and sample code that reproduces the issue are needed before
>>>any help here, this could result from a number of different scenarios.
>>
>> I am in the process of creating a standalone example that exhibits the
>> problem but I was just checking whether this is a common problem
>> because I am making some obvious error.  The crash happens in
>> ActiveMQConsumer::close() BTW;
>
>Yes, it's a known problem presented as a feature rather than a bug.
>Due to strange design, you can't just stop(), close() and delete your
>consumer. You need to stop the corresponding session before closing
>your consumer:
>
>consumer.stop();
>session.stop();
>consumer.close();
>delete consumer;
>session.start();
>
>(see https://issues.apache.org/jira/browse/AMQCPP-361)

Thanks for the post but I don't believe this is the same issue.  The
application now just crashes instead within the session.stop() method.

Just to make sure I am getting things right I do the following in the
cleanup:

 delete destination;
 consumer.stop();
 session.stop();
 consumer.close();
 delete consumer;
 delete session;

Is this the correct order?

Reply via email to