I have a problem with a trusted client in ActiveMQ. I am using stomp.py in Python.
conn.start()
conn.connect(wait=True, header = {'client-id': 'myhostname' })
conn.subscribe(
'/topic/testTopic', ack='auto',
headers = {
'activemq.subscriptionName': 'myhostname',
'selector': "clientid <> '%s'" % 'myhostname'
}
)
As you can see from my code, I set my clientId as my own hostname. As shown in the attached screenshot (below), clientId is displayed as "ID: Atlas ....".
The problem is that every time I disconnect my client based on stomp.py, I get a new "clientId" the next time I connect. This makes the ActiveMQ subscriber list populate:
(The image above shows the subscriber on my ActiveMQ broker. The next time I disconnect and then connect, the record above will still remain and another one will be added. Pretty soon I have many subscribers in the list).
, 100% ( , < > be =, ), clientId - .