activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Burton (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-5562) Anonymous producers do not raise ActiveMQ.Advisory.Producer.Queue.> advisory
Date Tue, 03 Feb 2015 17:10:36 GMT
Kevin Burton created AMQ-5562:
---------------------------------

             Summary: Anonymous producers do not raise ActiveMQ.Advisory.Producer.Queue.>
advisory
                 Key: AMQ-5562
                 URL: https://issues.apache.org/jira/browse/AMQ-5562
             Project: ActiveMQ
          Issue Type: Bug
            Reporter: Kevin Burton


If I send to a producer with:

        MessageProducer producer = session.createProducer( dest );
        producer.send( message );

That works and I receive the advisory.

However, if send like this:

        MessageProducer producer = session.createProducer( null );
        producer.send( dest, message );

The advisory isn’t raised.  I have a unit test to confirm that the message was delivered
to the queue and that it fails to raise the advisory.

The problem is that the second method is about 5x faster than the first.  

I can certainly rewrite my code, but this could lead to bugs where code expects to receive
the advisory notice but now there’s a back door to send messages without the advisory message
meaning that you could break production code.

On the list, Timothy Bish noted:

> This is by design as the second case creates an anonymous producer that can send to any
destination that it has permission to write to.  Sending that advisory every time an anonymous
producer sent a message to a given destination would create a flood of advisories which would
not really be of help.

However:

> I mean I can create the flood of advisories now anyway. I just have to manually create
a non-anonymous producer and it would then send the same number of advisories.

> Now it’s just slower and you’ve put a burden on me to maintain an LRU cache and expiry
so that I can have reasonable performance :-(

I think this is a bug.  If you're experiencing floods you can always turn off advisories or
be more specific in which queues you would like notifications about.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message