The route shutdown and removal appears to work.
Where do you see this active subscription?
Does it disappear when you GC the ActiveMQ component alltogether?
Can you show the result of `netstat -atp` on the Broker machine?
On 3/30/20 11:54 AM, Modanese, Riccardo wrote:
Hi
I switched the log to DEBUG level and I simplified the test
leaving only one route (and reducing the concurrent consumers from 2
to 4).
The issue still happens.
ActiveMQ has a subscription:
queue://Consumer.my-route-subs-id:EXACTLY_ONCE.VirtualTopic.my-subs.>
with one consumer and no pending messages after the route is removed.
You can see the extracted log in attachment.
> Il giorno 30 mar 2020, alle ore 07:27, Ralf Claussnitzer
<[email protected]> ha scritto:
>
> Hi Riccardo,
>
> what is happening in DEBUG log when you call the remove?
>
> Maybe you are dealing with inflight exchanges here?
>
> Can you try to instead just stop the routes?
>
> -Ralf
>
> On 3/27/20 2:20 PM, Modanese, Riccardo wrote:
>> Hi all,
>>
>> I'm experimenting with programmatically routes creation and
removal (Camel version 2.17).
>> The routes are created and removed at runtime through my custom
RouteBuilder instance and are consuming from ActiveMQ 5 (with virtual
topic enabled).
>> Once a route is removed (*) all the subscriptions (for this
specific route) to the broker are removed except for one.
>> So one subscription to the broker still remains active.
>>
>> Unfortunately I have no simple test code to reproduce the behavior
I'm seeing.
>>
>> Has someone any idea if I'm missing something or can point me to
the right direction?
>>
>> Thank you.
>>
>> Riccardo
>>
>>
>> (*)
getContext().removeRouteDefinition(getContext().getRouteDefinition(routeId));