Classification: Public

Justin,

Once again thx!

This specific case was a JMS+AMQP producer. Due to having only a wildcard 
consumer, the address has no consumers of its own and is always auto-deleted 
after the configured duration. The confusing part was that the address is shown 
for the producer in the "Browse Producers" screen. That gave the impression 
that all needed info is already available. I'll just raise the value for 
auto-delete-addresses-delay a bit :-)

thx!
Erwin

-----Original Message-----
From: Justin Bertram <jbert...@apache.org> 
Sent: Friday, November 3, 2023 4:48 PM
To: users@activemq.apache.org
Subject: Re: auto-delete on addresses that still have a producer


EXTERNAL SENDER:   Do not click any links or open any attachments unless you 
trust the sender and know the content is safe.
EXPÉDITEUR EXTERNE:    Ne cliquez sur aucun lien et n’ouvrez aucune pièce 
jointe à moins qu’ils ne proviennent d’un expéditeur fiable, ou que vous ayez 
l'assurance que le contenu provient d'une source sûre.

The broker does its best to track producers, but most protocols don't even have 
the concept of a "named" producer (i.e. a producer that's registered on the 
server to a particular endpoint). Most protocols only support "anonymous" 
producers which can send to any endpoint at any time which means in most 
circumstances the broker doesn't actually know when a client is going to send a 
message (if at all) and when a client does send a message the broker doesn't 
know where it's going to go until it actually arrives.

The only API I'm aware of that has named producers is JMS and even JMS supports 
anonymous producers. Furthermore, of the three protocols used by JMS clients 
(i.e. core, OpenWire, and AMQP) only OpenWire supports named producers.

In short, there's no real way for the broker to know when there's a producer 
"on" an address.

The situation for consumers is, of course, the complete opposite. The broker 
must know about consumers so it can dispatch messages to them.

Ultimately if an address is removed while a slow producer is still sending 
messages to it then it will be re-created automatically if the configuration 
supports that.

Hope that helps!


Justin

On Fri, Nov 3, 2023 at 9:17 AM Dondorp, Erwin <erwin.dond...@ns.nl.invalid>
wrote:

> Classification: Public
>
> Hello,
>
> Today I noticed that an address was auto-removed while it still had a 
> producer active.
> The producer has a very low production rate, its interval was above 
> the value of auto-delete-addresses-delay, so the timing constraints 
> were still ok.
> Nothing was broken and I can easily increase auto-delete-addresses-delay.
>
> In the source-code, in function "reapAddresses", it looks to me as if 
> Artemis does not try to prevent such address-removal with a producer 
> present.
>
> Therefore, the question remains:
> Should an address be auto-removed when there still is a producer active?
>
> thx!
> Erwin
>
> ________________________________
>
> Deze e-mail, inclusief eventuele bijlagen, is uitsluitend bestemd voor 
> (gebruik door) de geadresseerde. De e-mail kan persoonlijke of 
> vertrouwelijke informatie bevatten. Openbaarmaking, vermenigvuldiging, 
> verspreiding en/of verstrekking van (de inhoud van) deze e-mail (en 
> eventuele bijlagen) aan derden is uitdrukkelijk niet toegestaan. 
> Indien u niet de bedoelde geadresseerde bent, wordt u vriendelijk 
> verzocht degene die de e-mail verzond hiervan direct op de hoogte te 
> brengen en de e-mail (en eventuele bijlagen) te vernietigen.
>
> Informatie 
> vennootschap<https://urldefense.com/v3/__http://www.ns.nl/emaildisclaimer__;!!AaIhyw!q-qEg-q6E6_HDQ-ZdHruC9V7pEyFIV0RizC8dsmHSQ2SQ2BuAzVBGnWsmnKRSXwCuv2dgRqsTb1bBe9INqE$
>  >
>

Reply via email to