activemq message security

Thu, Jul 30, 2009

Worried about what clients are consuming messages on your broker? Implement a MessageAuthorizationPolicy. Add it to your camel-config:

<broker useJmx=“true” persistent=“false”
    <bean class=“”

<transportConnectors> <transportConnector uri=“tcp://localhost:61616” /> <transportConnector name=“stomp” uri=“stomp://localhost:61613”/> </transportConnectors> </broker>

then implement one:

import; import; import org.apache.activemq.command.Message;

public class MessageGuard implements MessageAuthorizationPolicy { public boolean isAllowedToConsume(ConnectionContext context, Message message) { // Do funny stuff with the context client-id, message producerid, // message destination etc if (doFunnyStuff()) { return true; } else { return false; } } }

comments powered by Disqus