Serdar Gökay created CAMEL-25599:
------------------------------------

             Summary: camel-milo - Stopped milo-client consumers keep their 
monitored items, and failed items are ignored
                 Key: CAMEL-25599
                 URL: https://issues.apache.org/jira/browse/CAMEL-25599
             Project: Camel
          Issue Type: Bug
          Components: camel-milo
    Affects Versions: 4.16.0, 4.22.1, 4.18.5
         Environment: Camel main (a7169d7c), Eclipse Milo 1.1.8, Java 21
            Reporter: Serdar Gökay


Since the Milo 1.x migration (CAMEL-22086, 4.16.0), {{SubscriptionManager}} has 
two problems:

# {{goodSubscriptions}} is never filled, so {{deactivate()}} never deletes a 
monitored item. When a milo-client route is stopped and started again while 
other endpoints keep the shared connection open, the old item stays on the 
server with its listener, and each value change then produces two exchanges.
# The results of {{createMonitoredItems()}} are ignored. A node that cannot be 
monitored (for example {{Bad_NodeIdUnknown}}) produces no exchange and no log 
entry, and no retry is scheduled. Before the migration, the consumer received a 
{{DataValue}} with the bad status (visible with {{omitNullValues=false}}), and 
the item was retried every 10 seconds.

Both reproduce on main (a7169d7c) against the embedded Milo server used by the 
camel-milo tests. camel-4.16.x and camel-4.18.x contain the same code.

Planned fix: record the created items, attach the listener before an item is 
created, report bad results and retry them as before the migration, and delete 
the items when the consumer stops. A PR will follow.

_Claude Code on behalf of etzel-mes_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to