A similar question was asked about a year ago. http://stackoverflow.com/questions/29919469/intercept-incoming-jms-messages-to-activemq-reject-approve-based-on-rules
However, I'm not sure if it was absolutely answered with a definitive yes or no. Can anyone clear this up, one way or another, please? Note: * This behaviour absolutely must be SYNCHRONOUS. * It has absolutely nothing to do with anything happening on the consumer side. * Interestingly, though, it looks exactly like a PRODUCER's version of the 'Message level Authorization' plugin (which is only available for consumers) detailed at the bottom of http://activemq.apache.org/security.html Is it possible, or not, to implement the following scenario: 1. A JMS producer (using AMQP 1.0) sends a message, syncronously, to ActiveMQ, for it to be enqueued. 2. ActiveMQ checks if the message is allowed (according to business-defined rules, concerning the message content) to be sent to the queue which the producer requested it be enqueued to. 3a. If the message is allowed in that queue, ActiveMQ enqueues in the usual manner, and the JMS producer's (send) method returns normally. 3b. If the message is NOT allowed in that queue, ActiveMQ rejects the message, and the JMS producer's (send) method throws an exception: ***This needs to work in the same way as a JMS exception being thrown, from within the send method, if a producer tries to send a message a non-existent queue which they aren't authorized to create.*** This is to allow the producer to know, AT THE TIME OF TRYING TO SEND, whether or not their message was actually enqueued in the broker or not. The producer application must NOT discard its copy of the message until the copy which was sent to the broker has been enqueued. If an exception is thrown from the producer's send method, the message must NOT be considered as 'sent'. The application which calls the producer can then make the appropriate decision WRT what to do with the (as yet, still 'not sent') message. Thanks! -- View this message in context: http://activemq.2283324.n4.nabble.com/Can-ActiveMQ-reject-a-message-on-send-tp4724266.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.