Package org.apache.activemq.broker

Examples of org.apache.activemq.broker.BrokerPluginSupport


        brokerService.setUseJmx(true);
        brokerService.setDeleteAllMessagesOnStartup(true);
        connectionUri = brokerService.addConnector(BROKER_ADDRESS).getPublishableConnectString();

        brokerService.setPlugins(new BrokerPlugin[]{
            new BrokerPluginSupport() {

                @Override
                public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
                    throw new javax.jms.JMSSecurityException(connectionUri);
                }
View Full Code Here


        BrokerService brokerService = brokers.get(broker2).broker;
        brokerService.setPersistent(true);
        brokerService.setDeleteAllMessagesOnStartup(true);
        brokerService.setPlugins(new BrokerPlugin[]{
                new BrokerPluginSupport() {
                    @Override
                    public void send(final ProducerBrokerExchange producerExchange,
                                     org.apache.activemq.command.Message messageSend)
                            throws Exception {
                        super.send(producerExchange, messageSend);
View Full Code Here

        BrokerService brokerService = brokers.get(broker2).broker;
        brokerService.setPersistent(true);
        brokerService.setDeleteAllMessagesOnStartup(true);
        brokerService.setPlugins(new BrokerPlugin[]{
                new BrokerPluginSupport() {
                    @Override
                    public void send(final ProducerBrokerExchange producerExchange,
                                     org.apache.activemq.command.Message messageSend)
                            throws Exception {
                        super.send(producerExchange, messageSend);
View Full Code Here

        bridgeBrokers(SPOKE, HUB);

        final BrokerItem hub = brokers.get(HUB);
        hub.broker.setPlugins(new BrokerPlugin[]{
                new BrokerPluginSupport() {
                    int sleepCount = 2;
                    @Override
                    public void removeConnection(ConnectionContext context,
                            ConnectionInfo info, Throwable error)
                            throws Exception {
View Full Code Here

        // make broker available to recovery processing on app context start
        try {
            broker = createBroker(true);
            broker.setPlugins(new BrokerPlugin[]{
                new BrokerPluginSupport() {
                    @Override
                    public void commitTransaction(ConnectionContext context,
                                                  TransactionId xid, boolean onePhase) throws Exception {
                        if (onePhase) {
                            super.commitTransaction(context, xid, onePhase);
View Full Code Here

     
      final int maxConsumers = 4;
        broker = createBroker(true);
           
        broker.setPlugins(new BrokerPlugin[] {
                new BrokerPluginSupport() {
                    int consumerCount;

                    // broker is killed on x create consumer
                    @Override
                    public Subscription addConsumer(ConnectionContext context,
View Full Code Here

       
        broker = createBroker(true);
        setPersistenceAdapter(adapter);
           
        broker.setPlugins(new BrokerPlugin[] {
                new BrokerPluginSupport() {
                    @Override
                    public void commitTransaction(ConnectionContext context,
                            TransactionId xid, boolean onePhase) throws Exception {
                        super.commitTransaction(context, xid, onePhase);
                        // so commit will hang as if reply is lost
View Full Code Here

        final int adapter = 0;
        broker = createBroker(true);
        setPersistenceAdapter(adapter);
           
        broker.setPlugins(new BrokerPlugin[] {
                new BrokerPluginSupport() {

                    // broker is killed on delivered ack as prefetch is 1
                    @Override
                    public void acknowledge(
                            ConsumerBrokerExchange consumerExchange,
View Full Code Here

  public void doTestFailoverConsumerDups(final boolean watchTopicAdvisories) throws Exception {
     
        broker = createBroker(true);
           
        broker.setPlugins(new BrokerPlugin[] {
                new BrokerPluginSupport() {
                    @Override
                    public void commitTransaction(ConnectionContext context,
                            TransactionId xid, boolean onePhase) throws Exception {
                        // so commit will hang as if reply is lost
                        context.setDontSendReponse(true);
View Full Code Here

   
    public void doTestFailoverConsumerOutstandingSendTx(final boolean doActualBrokerCommit) throws Exception {
        final boolean watchTopicAdvisories = true;
        broker = createBroker(true);

        broker.setPlugins(new BrokerPlugin[] { new BrokerPluginSupport() {
            @Override
            public void commitTransaction(ConnectionContext context,
                    TransactionId xid, boolean onePhase) throws Exception {
                // from the consumer perspective whether the commit completed on the broker or
                // not is irrelevant, the transaction is still in doubt in the absence of a reply
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.BrokerPluginSupport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.