@Override public String getBrokerName() { return getNext().getBrokerName(); }
final void messageSent(final ConnectionContext context, final Message msg) throws Exception { pendingSends.decrementAndGet(); destinationStatistics.getEnqueues().increment(); destinationStatistics.getMessages().increment(); destinationStatistics.getMessageSize().addSize(msg.getSize()); messageDelivered(context, msg); consumersLock.readLock().lock(); try { if (consumers.isEmpty()) { onMessageWithNoConsumers(context, msg); } }finally { consumersLock.readLock().unlock(); } LOG.debug("{} Message {} sent to {}", new Object[]{ broker.getBrokerName(), msg.getMessageId(), this.destination }); wakeup(); }
throw new IllegalStateException(broker.getBrokerName() + " Cannot add a consumer to a session that had not been registered: " + sessionId);
config.setBrokerName(broker.getBrokerName());
@Override public void start() throws Exception { broker = brokerService.getBroker(); brokerInfo.setBrokerName(broker.getBrokerName()); brokerInfo.setBrokerId(broker.getBrokerId()); brokerInfo.setPeerBrokerInfos(broker.getPeerBrokerInfos());
protected ActiveMQMapMessage prepareSubscriptionMessage(SubscriptionViewMBean subscriber) throws JMSException { Broker regionBroker = getBrokerService().getRegionBroker(); ActiveMQMapMessage statsMessage = new ActiveMQMapMessage(); statsMessage.setString("brokerName", regionBroker.getBrokerName()); statsMessage.setString("brokerId", regionBroker.getBrokerId().toString()); statsMessage.setString("destinationName", subscriber.getDestinationName()); statsMessage.setString("clientId", subscriber.getClientId()); statsMessage.setString("connectionId", subscriber.getConnectionId()); statsMessage.setLong("sessionId", subscriber.getSessionId()); statsMessage.setString("selector", subscriber.getSelector()); statsMessage.setLong("enqueueCounter", subscriber.getEnqueueCounter()); statsMessage.setLong("dequeueCounter", subscriber.getDequeueCounter()); statsMessage.setLong("dispatchedCounter", subscriber.getDispatchedCounter()); statsMessage.setLong("dispatchedQueueSize", subscriber.getDispatchedQueueSize()); statsMessage.setInt("prefetchSize", subscriber.getPrefetchSize()); statsMessage.setInt("maximumPendingMessageLimit", subscriber.getMaximumPendingMessageLimit()); statsMessage.setBoolean("exclusive", subscriber.isExclusive()); statsMessage.setBoolean("retroactive", subscriber.isRetroactive()); statsMessage.setBoolean("slowConsumer", subscriber.isSlowConsumer()); return statsMessage; }
public String getBrokerName() { return next.getBrokerName(); }
@Override public String getBrokerName() { return getNext().getBrokerName(); }
@Override public String getBrokerName() { return getNext().getBrokerName(); }
@Override public String getBrokerName() { return getNext().getBrokerName(); }
public String getBrokerName() { return getNext().getBrokerName(); }
final void messageSent(final ConnectionContext context, final Message msg) throws Exception { pendingSends.decrementAndGet(); destinationStatistics.getEnqueues().increment(); destinationStatistics.getMessages().increment(); destinationStatistics.getMessageSize().addSize(msg.getSize()); messageDelivered(context, msg); consumersLock.readLock().lock(); try { if (consumers.isEmpty()) { onMessageWithNoConsumers(context, msg); } }finally { consumersLock.readLock().unlock(); } LOG.debug("{} Message {} sent to {}", new Object[]{ broker.getBrokerName(), msg.getMessageId(), this.destination }); wakeup(); }
final void messageSent(final ConnectionContext context, final Message msg) throws Exception { pendingSends.decrementAndGet(); destinationStatistics.getEnqueues().increment(); destinationStatistics.getMessages().increment(); destinationStatistics.getMessageSize().addSize(msg.getSize()); messageDelivered(context, msg); consumersLock.readLock().lock(); try { if (consumers.isEmpty()) { onMessageWithNoConsumers(context, msg); } }finally { consumersLock.readLock().unlock(); } LOG.debug("{} Message {} sent to {}", new Object[]{ broker.getBrokerName(), msg.getMessageId(), this.destination }); wakeup(); }
final void messageSent(final ConnectionContext context, final Message msg) throws Exception { pendingSends.decrementAndGet(); destinationStatistics.getEnqueues().increment(); destinationStatistics.getMessages().increment(); destinationStatistics.getMessageSize().addSize(msg.getSize()); messageDelivered(context, msg); consumersLock.readLock().lock(); try { if (consumers.isEmpty()) { onMessageWithNoConsumers(context, msg); } }finally { consumersLock.readLock().unlock(); } LOG.debug("{} Message {} sent to {}", new Object[]{ broker.getBrokerName(), msg.getMessageId(), this.destination }); wakeup(); }
public Response processAddConsumer(ConsumerInfo info) throws Exception { SessionId sessionId = info.getConsumerId().getParentId(); ConnectionId connectionId = sessionId.getParentId(); TransportConnectionState cs = lookupConnectionState(connectionId); SessionState ss = cs.getSessionState(sessionId); if (ss == null) { throw new IllegalStateException(broker.getBrokerName() + " Cannot add a consumer to a session that had not been registered: " + sessionId); } // Avoid replaying dup commands if (!ss.getConsumerIds().contains(info.getConsumerId())) { broker.addConsumer(cs.getContext(), info); try { ss.addConsumer(info); } catch (IllegalStateException e) { broker.removeConsumer(cs.getContext(), info); } } return null; }
throw new IllegalStateException(broker.getBrokerName() + " Cannot add a consumer to a session that had not been registered: " + sessionId);
throw new IllegalStateException(broker.getBrokerName() + " Cannot add a consumer to a session that had not been registered: " + sessionId);
protected ActiveMQMapMessage prepareSubscriptionMessage(SubscriptionViewMBean subscriber) throws JMSException { Broker regionBroker = getBrokerService().getRegionBroker(); ActiveMQMapMessage statsMessage = new ActiveMQMapMessage(); statsMessage.setString("brokerName", regionBroker.getBrokerName()); statsMessage.setString("brokerId", regionBroker.getBrokerId().toString()); statsMessage.setString("destinationName", subscriber.getDestinationName()); statsMessage.setString("clientId", subscriber.getClientId()); statsMessage.setString("connectionId", subscriber.getConnectionId()); statsMessage.setLong("sessionId", subscriber.getSessionId()); statsMessage.setString("selector", subscriber.getSelector()); statsMessage.setLong("enqueueCounter", subscriber.getEnqueueCounter()); statsMessage.setLong("dequeueCounter", subscriber.getDequeueCounter()); statsMessage.setLong("dispatchedCounter", subscriber.getDispatchedCounter()); statsMessage.setLong("dispatchedQueueSize", subscriber.getDispatchedQueueSize()); statsMessage.setInt("prefetchSize", subscriber.getPrefetchSize()); statsMessage.setInt("maximumPendingMessageLimit", subscriber.getMaximumPendingMessageLimit()); statsMessage.setBoolean("exclusive", subscriber.isExclusive()); statsMessage.setBoolean("retroactive", subscriber.isRetroactive()); statsMessage.setBoolean("slowConsumer", subscriber.isSlowConsumer()); return statsMessage; }
protected ActiveMQMapMessage prepareSubscriptionMessage(SubscriptionViewMBean subscriber) throws JMSException { Broker regionBroker = getBrokerService().getRegionBroker(); ActiveMQMapMessage statsMessage = new ActiveMQMapMessage(); statsMessage.setString("brokerName", regionBroker.getBrokerName()); statsMessage.setString("brokerId", regionBroker.getBrokerId().toString()); statsMessage.setString("destinationName", subscriber.getDestinationName()); statsMessage.setString("clientId", subscriber.getClientId()); statsMessage.setString("connectionId", subscriber.getConnectionId()); statsMessage.setLong("sessionId", subscriber.getSessionId()); statsMessage.setString("selector", subscriber.getSelector()); statsMessage.setLong("enqueueCounter", subscriber.getEnqueueCounter()); statsMessage.setLong("dequeueCounter", subscriber.getDequeueCounter()); statsMessage.setLong("dispatchedCounter", subscriber.getDispatchedCounter()); statsMessage.setLong("dispatchedQueueSize", subscriber.getDispatchedQueueSize()); statsMessage.setInt("prefetchSize", subscriber.getPrefetchSize()); statsMessage.setInt("maximumPendingMessageLimit", subscriber.getMaximumPendingMessageLimit()); statsMessage.setBoolean("exclusive", subscriber.isExclusive()); statsMessage.setBoolean("retroactive", subscriber.isRetroactive()); statsMessage.setBoolean("slowConsumer", subscriber.isSlowConsumer()); return statsMessage; }
protected ActiveMQMapMessage prepareSubscriptionMessage(SubscriptionViewMBean subscriber) throws JMSException { Broker regionBroker = getBrokerService().getRegionBroker(); ActiveMQMapMessage statsMessage = new ActiveMQMapMessage(); statsMessage.setString("brokerName", regionBroker.getBrokerName()); statsMessage.setString("brokerId", regionBroker.getBrokerId().toString()); statsMessage.setString("destinationName", subscriber.getDestinationName()); statsMessage.setString("clientId", subscriber.getClientId()); statsMessage.setString("connectionId", subscriber.getConnectionId()); statsMessage.setLong("sessionId", subscriber.getSessionId()); statsMessage.setString("selector", subscriber.getSelector()); statsMessage.setLong("enqueueCounter", subscriber.getEnqueueCounter()); statsMessage.setLong("dequeueCounter", subscriber.getDequeueCounter()); statsMessage.setLong("dispatchedCounter", subscriber.getDispatchedCounter()); statsMessage.setLong("dispatchedQueueSize", subscriber.getDispatchedQueueSize()); statsMessage.setInt("prefetchSize", subscriber.getPrefetchSize()); statsMessage.setInt("maximumPendingMessageLimit", subscriber.getMaximumPendingMessageLimit()); statsMessage.setBoolean("exclusive", subscriber.isExclusive()); statsMessage.setBoolean("retroactive", subscriber.isRetroactive()); statsMessage.setBoolean("slowConsumer", subscriber.isSlowConsumer()); return statsMessage; }